Skip to content

Commit

Permalink
[ADD] GitHub workflow to build on release
Browse files Browse the repository at this point in the history
  • Loading branch information
tarteo committed Jan 9, 2025
1 parent 0770d3c commit d3f41df
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/ci.yml → .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
name: ci
name: build

on:
push:
branches:
- "16.0"
workflow_call:
inputs:
tags:
required: true
type: string

jobs:
docker:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Login to ghcr.io
- name: Login to Docker
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
- name: Build and Push
uses: docker/build-push-action@v4
with:
push: true
tags: ghcr.io/${{ github.repository }}:latest,ghcr.io/${{ github.repository }}:${{ github.sha }}
tags: ${{ inputs.tags }}
12 changes: 12 additions & 0 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: dev-build

on:
push:
branches:
- "16.0"

jobs:
build:
uses: ./.github/workflows/build-and-push.yml
with:
tags: ghcr.io/${{ github.repository_owner }}/curq:dev,ghcr.io/${{ github.repository_owner }}/curq:${{ github.sha }}
11 changes: 11 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: release-build

on:
release:
types: [published]

jobs:
build:
uses: ./.github/workflows/build-and-push.yml
with:
tags: ghcr.io/${{ github.repository_owner }}/curq:latest,ghcr.io/${{ github.repository_owner }}/curq:${{ github.event.release.tag_name }}

0 comments on commit d3f41df

Please sign in to comment.