Skip to content

Commit

Permalink
fix: avoid duplicate docker builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard87 committed Oct 14, 2024
1 parent a4e1b2a commit a23e619
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build-dev-container.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Build Dev Images

on:
push:
branches:
- main
pull_request: {}
workflow_dispatch:

Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,22 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=semver,pattern=${{ env.TAG }}
type=raw,value=latest-{{date 'YYYYMMDDHHmmss'}}-{{sha}}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{env.TAG}}"
tags: ${{ steps.meta.outputs.tags }}
platforms: |
linux/amd64
linux/arm64
Expand Down

0 comments on commit a23e619

Please sign in to comment.