Skip to content

Commit

Permalink
chore(ci): fix container publishing workflow conditions.
Browse files Browse the repository at this point in the history
  • Loading branch information
AliMD committed Nov 10, 2023
1 parent ee2df52 commit fe47aba
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/publish-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,30 +56,30 @@ jobs:
./${{ matrix.path }}/*
- name: πŸ— Install cosign
if: ${{ github.event_name != 'pull_request' && steps.file_change.outputs.container_folder == 'true' }}
if: ${{ github.event_name != 'pull_request' && steps.file_change.outputs.container_folder != 'false' }}
uses: sigstore/[email protected]

- name: πŸ— Setup Docker Buildx
if: ${{ steps.file_change.outputs.container_folder == 'true' }}
if: ${{ steps.file_change.outputs.container_folder != 'false' }}
uses: docker/[email protected]

- name: πŸ— Cache Docker Layers
if: ${{ steps.file_change.outputs.container_folder == 'true' }}
if: ${{ steps.file_change.outputs.container_folder != 'false' }}
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: alwatr-${{ matrix.path }}

- name: πŸ— Log into registry ${{env.REGISTRY}}
if: ${{ github.event_name != 'pull_request' && steps.file_change.outputs.container_folder == 'true' }}
if: ${{ github.event_name != 'pull_request' && steps.file_change.outputs.container_folder != 'false' }}
uses: docker/[email protected]
with:
registry: ${{env.REGISTRY}}
username: ${{github.repository_owner}}
password: ${{secrets.GITHUB_TOKEN}}

- name: πŸ— Extract metadata
if: ${{ steps.file_change.outputs.container_folder == 'true' }}
if: ${{ steps.file_change.outputs.container_folder != 'false' }}
id: meta
uses: docker/[email protected]
with:
Expand All @@ -92,7 +92,7 @@ jobs:
type=ref,enable=true,event=branch
- name: πŸš€ Build and push container image
if: ${{ steps.file_change.outputs.container_folder == 'true' }}
if: ${{ steps.file_change.outputs.container_folder != 'false' }}
id: build_and_push
uses: docker/[email protected]
with:
Expand All @@ -106,7 +106,7 @@ jobs:
BUILD_REV=${{github.sha}}
- name: πŸ— Sign the image with GitHub OIDC Token
if: ${{ github.event_name != 'pull_request' && steps.file_change.outputs.container_folder == 'true' }}
if: ${{ github.event_name != 'pull_request' && steps.file_change.outputs.container_folder != 'false' }}
env:
COSIGN_EXPERIMENTAL: 'true'
run: echo "${{steps.meta.outputs.tags}}" | xargs -I {} cosign sign --yes {}@${{steps.build_and_push.outputs.digest}}

0 comments on commit fe47aba

Please sign in to comment.