From 83a0c17035a7118346b51a44c637680854e1fcc7 Mon Sep 17 00:00:00 2001 From: Ivan P <2119240+i5okie@users.noreply.github.com> Date: Fri, 10 Jan 2025 13:25:16 -0800 Subject: [PATCH 1/2] build frontend release Signed-off-by: Ivan P <2119240+i5okie@users.noreply.github.com> --- .github/workflows/build_release.yaml | 50 ++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/build_release.yaml diff --git a/.github/workflows/build_release.yaml b/.github/workflows/build_release.yaml new file mode 100644 index 0000000..5b03be9 --- /dev/null +++ b/.github/workflows/build_release.yaml @@ -0,0 +1,50 @@ +name: Build Release + +on: + push: + tags: + - 'v*' + workflow_dispatch: + +permissions: + packages: write + contents: write + +jobs: + build_frontend: + name: 'Build Orgbook BC Client' + runs-on: ubuntu-latest + if: github.repository_owner == 'bcgov' + steps: + - uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Prepare docker tags for image + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository }}/orgbook-bc-client + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=ref + type=sha + + - name: Build and push image + id: builder + uses: docker/build-push-action@v6 + with: + context: ./ + file: ./docker/Dockerfile + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} From 8e56c67d5bf8f3cabbcdc43038c1bbdda119ca61 Mon Sep 17 00:00:00 2001 From: Ivan P <2119240+i5okie@users.noreply.github.com> Date: Mon, 13 Jan 2025 14:07:01 -0800 Subject: [PATCH 2/2] trigger on published release Signed-off-by: Ivan P <2119240+i5okie@users.noreply.github.com> --- .github/workflows/build_release.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_release.yaml b/.github/workflows/build_release.yaml index 5b03be9..4199a0c 100644 --- a/.github/workflows/build_release.yaml +++ b/.github/workflows/build_release.yaml @@ -1,9 +1,8 @@ name: Build Release on: - push: - tags: - - 'v*' + release: + types: [published] workflow_dispatch: permissions: