Skip to content

Commit

Permalink
good ol days when image names where image names
Browse files Browse the repository at this point in the history
  • Loading branch information
mauwii committed Sep 15, 2023
1 parent f3efa16 commit dee5be7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ jobs:
uses: docker/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
images: ${{ github.actor != 'nektos/act' && format('{0}/{1}', env.REGISTRY, env.IMAGE_REPOSITORY) || env.IMAGE_REPOSITORY }}
# images: ${{ github.actor != 'nektos/act' && format('{0}/{1}', env.REGISTRY, env.IMAGE_REPOSITORY) || env.IMAGE_REPOSITORY }}
images: ${{ env.IMAGE_NAME }}
tags: |
type=sha,prefix=${{ matrix.from-version }}-,format=short,enable={{is_default_branch}},priority=1000
type=raw,value=${{ matrix.from-version }},enable={{is_default_branch}},priority=900
Expand Down Expand Up @@ -152,16 +153,20 @@ jobs:
REGISTRY_IMAGE: ${{ format('{0}/{1}', env.REGISTRY, env.IMAGE_REPOSITORY) }}
CACHE_FROM_REGISTRY_IMAGE: ${{ format('{0}/{1}', env.CACHE_FROM_REGISTRY, env.IMAGE_REPOSITORY) }}

- run: docker image inspect "${IMAGE_NAME}"
env:
IMAGE_NAME: ${{ format('{0}:{1}-{2}', env.IMAGE_NAME, matrix.from-version, github.head_ref || github.ref_name) }}

# vulnerability scanning to verify PRs
- name: Docker Scout
id: docker-scout
continue-on-error: true
uses: docker/[email protected]
with:
command: sbom,compare
# image: ${{ steps.meta.outputs.tags }}
image: ${{ steps.meta.outputs.tags }}
# image: ${{ github.actor != 'nektos/act' && steps.meta.outputs.tags || format('{0}:{1}-{2}', env.IMAGE_REPOSITORY, matrix.from-version, github.head_ref || github.ref_name) }}
image: ${{ format('{0}:{1}-{2}', env.IMAGE_REPOSITORY, matrix.from-version, github.head_ref || github.ref_name) }}
# image: ${{ format('{0}:{1}-{2}', env.IMAGE_REPOSITORY, matrix.from-version, github.head_ref || github.ref_name) }}
to: ${{ format('{0}/{1}:{2}-{3}', env.CACHE_FROM_REGISTRY, env.IMAGE_REPOSITORY, matrix.from-version, 'main') }}
organization: ${{ vars.DOCKERHUB_USER }}
ignore-unchanged: true
Expand Down

0 comments on commit dee5be7

Please sign in to comment.