Skip to content

Commit

Permalink
chore: Improve ghcr workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Dec 20, 2023
1 parent 7f78a31 commit 239bb96
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ghcr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Determine whether to use cache
id: check-cache
run: echo "::set-output name=use_cache::$(if [ '${{ github.event_name }}' == 'workflow_dispatch' ] || [ '${{ github.event_name }}' == 'schedule' ]; then echo 'false'; else echo 'true'; fi)"

- name: Build and push Docker image
uses: docker/build-push-action@fdf7f43ecf7c1a5c7afe936410233728a8c2d9c2
with:
Expand All @@ -56,3 +60,4 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
no-cache: ${{ steps.check-cache.outputs.use_cache }}

0 comments on commit 239bb96

Please sign in to comment.