Skip to content

Commit

Permalink
Merge pull request #383 from doitintl/ci-fix-latest
Browse files Browse the repository at this point in the history
ci: Fix latest tag and avoid rebuild
  • Loading branch information
stepanstipl authored Oct 6, 2022
2 parents c5d5211 + b6018d5 commit 126e47b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,17 +169,12 @@ jobs:
with:
context: .
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.create-release.outputs.tag_name }}
tags: |
${{ format('{0}/{1}:{2}', env.REGISTRY, env.IMAGE_NAME, needs.create-release.outputs.tag_name) }}
${{ !startsWith(github.ref, 'refs/tags/nightly') && format('{0}/{1}:{2}', env.REGISTRY, env.IMAGE_NAME, 'latest') }}
build-args: |
GITHUB_REF
GITHUB_SHA
- name: Push latest
uses: docker/build-push-action@v3
if: ${{ !contains(github.ref, 'nightly') }}
with:
context: .
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
release-artifacts:
name: Release Artifacts
needs:
Expand Down
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ RUN go mod download
COPY cmd cmd
COPY pkg pkg
COPY Makefile Makefile
RUN export
RUN make all

FROM scratch
Expand Down

0 comments on commit 126e47b

Please sign in to comment.