Skip to content

Commit

Permalink
use meta-step outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
mauwii committed Sep 16, 2023
1 parent 022b009 commit b375981
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ jobs:
- name: build image
run: >-
docker build
--tag ${{ env.FROM_TAG }}
--tag ${{ steps.meta.outputs.tags }}
--file linux/${{ matrix.distro }}/Dockerfile
--cache-from ${{ format('type=registry,ref={0}:{1}', env.REGISTRY_IMAGE, matrix.from-version) }}
--cache-from ${{ format('type=registry,ref={0}:cache-{1}', env.REGISTRY_IMAGE, matrix.codename) }}
Expand All @@ -187,9 +187,12 @@ jobs:
REPOSITORY_LINK: https://github.com/${{ github.repository }}

# Just for debugging
- name: inspect image
- name: inspect FROM_TAG
continue-on-error: true
run: docker inspect ${{ env.FROM_TAG }}
- name: inspect steps.meta.outputs.tags
continue-on-error: true
run: docker inspect ${{ steps.meta.outputs.tags }}

# vulnerability scanning to verify PRs
- name: Docker Scout
Expand All @@ -198,14 +201,14 @@ jobs:
with:
# platform: linux/amd64
command: sbom,compare
image: ${{ env.PATH_TO_IMAGE}}
type: archive
image: ${{ github.ref == 'refs/heads/main' && steps.meta.outputs.tags || env.PATH_TO_IMAGE }}
type: ${{ github.ref == 'refs/heads/main' && 'image' || 'archive' }}
to: ${{ env.TO_TAG }}
ignore-unchanged: true
only-severities: critical
write-comment: ${{ github.actor != 'nektos/act' }}
write-comment: ${{ github.event_name == 'pull_request' && github.actor != 'nektos/act' }}
keep-previous-comments: true
summary: ${{ github.actor != 'nektos/act' }}
summary: ${{ github.event_name == 'pull_request' && github.actor != 'nektos/act' }}
github-token: ${{ secrets.GITHUB_TOKEN }}
organization: ${{ vars.DOCKERHUB_USER || github.repository_owner }}

Expand Down

0 comments on commit b375981

Please sign in to comment.