Skip to content

Commit

Permalink
publish image
Browse files Browse the repository at this point in the history
  • Loading branch information
naoki9911 committed Nov 9, 2023
1 parent aafc322 commit 2e3431b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/publish-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Publish Container Image"

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
publish-image:
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io/${{github.repository}}
DOCKER_BUILD_ARGS: --push
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v2
# buildkit requires $ACTIONS_CACHE_URL and $ACTIONS_RUNTIME_TOKEN for GHA build cache
- name: publish image
run: |
make build-driver
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ STARTER_IMAGE = ${STARTER_BINARY}
EXAMPLE_IMAGE = mfcp-example
endif

DOCKER_BUILD_ARGS ?= --load --build-arg STAGINGVERSION=${STAGINGVERSION}
DOCKER_BUILD_ARGS ?= --load
DOCKER_BUILD_ARGS += --build-arg STAGINGVERSION=${STAGINGVERSION}
ifneq ("$(shell docker buildx build --help | grep 'provenance')", "")
DOCKER_BUILD_ARGS += --provenance=false
endif
Expand Down

0 comments on commit 2e3431b

Please sign in to comment.