Skip to content

Commit

Permalink
ci: fixes docker push command (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathetake authored Dec 5, 2024
1 parent ea81a08 commit 8719beb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,5 @@ jobs:
run: make test

docker_builds:
name: Docker Build and/or Push
uses: ./.github/workflows/docker_builds_template.yaml
5 changes: 2 additions & 3 deletions .github/workflows/docker_builds_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
docker_builds:
name: Build and/or Push Docker Images
name: ${{ matrix.target.command_name }}
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -53,11 +53,10 @@ jobs:
# * Only use the tag if the event is a tag event, otherwise use "latest".
# * Build for both amd64 and arm64 platforms.
- name: Build and Push Image
if: github.event_name == 'push'
run: |
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
TAG="${GITHUB_REF#refs/tags/}"
else
TAG="latest"
fi
make docker-build.${{ matrix.target.command_name }} ENABLE_MULTI_PLATFORMS=true TAG=$TAG BUILDX_ARGS="--push"
make docker-build.${{ matrix.target.command_name }} ENABLE_MULTI_PLATFORMS=true TAG=$TAG DOCKER_BUILD_ARGS="--push"

0 comments on commit 8719beb

Please sign in to comment.