Skip to content

Commit

Permalink
Add Run workflow button to Build and Push Docker Image workflow (#3)
Browse files Browse the repository at this point in the history
* Add Run Workflow button
* Adding build support for linux/arm64
  • Loading branch information
marcleblanc2 authored Feb 16, 2024
1 parent 9818c6e commit 734fae3
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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}}

0 comments on commit 734fae3

Please sign in to comment.