From 734fae38a2f88e962fa6e7513b68cd31cdc14594 Mon Sep 17 00:00:00 2001 From: Marc <7050295+marcleblanc2@users.noreply.github.com> Date: Fri, 16 Feb 2024 04:02:40 +0300 Subject: [PATCH] Add Run workflow button to Build and Push Docker Image workflow (#3) * Add Run Workflow button * Adding build support for linux/arm64 --- .github/workflows/docker-image.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 9270451..3ef0841 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,14 +1,13 @@ -name: Docker Image CI +name: Build and Push Docker Image to GitHub Container Registry on: push: - branches: - - "**" - tags: - - "*" pull_request: - branches: - - "main" + types: + - opened + - reopened + - edited + workflow_dispatch: jobs: buildx: @@ -28,12 +27,13 @@ jobs: # generate Docker tags based on the following events/attributes tags: | type=semver,pattern={{raw}} - type=ref,event=branch,prefix={{branch}}- + type=ref,event=branch type=ref,event=pr type=ref,event=tag type=raw,value=insiders,enable=${{ github.ref == format('refs/heads/{0}', 'master') }} type=raw,value=insiders-$(date +%Y-%m-%d--%H-%M-%S),enable=${{ github.ref == format('refs/heads/{0}', 'master') }} type=sha,prefix= + type=sha,prefix=,format=long - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -51,7 +51,7 @@ jobs: uses: docker/build-push-action@v5 with: context: bridge-repo-converter/build - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 file: bridge-repo-converter/build/Dockerfile push: true sbom: true @@ -60,7 +60,3 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max - - - name: Inspect - run: | - docker image inspect ghcr.io/sourcegraph/bridge-repo-converter:{{sha}}