From 917f6cb36c6ac8b039814dab2c2e4599140c2e6f Mon Sep 17 00:00:00 2001 From: Michael McKechney Date: Sat, 27 Aug 2022 21:24:03 -0400 Subject: [PATCH] fixing container build for release --- .github/workflows/container-build.yml | 4 -- .github/workflows/container-release-build.yml | 39 +++++++++++++++++++ 2 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/container-release-build.yml diff --git a/.github/workflows/container-build.yml b/.github/workflows/container-build.yml index 156f706f..a321d02d 100644 --- a/.github/workflows/container-build.yml +++ b/.github/workflows/container-build.yml @@ -9,9 +9,6 @@ on: branches: - master - release: - types: [published] - jobs: docker: runs-on: ubuntu-latest @@ -46,4 +43,3 @@ jobs: ghcr.io/${{ github.repository_owner }}/sqlbuildmanager:${{ steps.date.outputs.date }} ghcr.io/${{ github.repository_owner }}/sqlbuildmanager:latest-vNext ghcr.io/${{ github.repository_owner }}/sqlbuildmanager:latest - ghcr.io/${{ github.repository_owner }}/sqlbuildmanager:${{ github.event.release.tag_name }} diff --git a/.github/workflows/container-release-build.yml b/.github/workflows/container-release-build.yml new file mode 100644 index 00000000..b2da83a0 --- /dev/null +++ b/.github/workflows/container-release-build.yml @@ -0,0 +1,39 @@ +name: container_release_build + +on: + + release: + types: [published] + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" + - + name: Checkout + uses: actions/checkout@v3 + - + name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v3 + with: + context: "{{defaultContext}}:src" + platforms: linux/amd64,linux/arm64 + push: true + tags: | + ghcr.io/${{ github.repository_owner }}/sqlbuildmanager:${{ github.event.release.tag_name }}