Skip to content

Commit

Permalink
Fix image resolution for ghcr
Browse files Browse the repository at this point in the history
Signed-off-by: Danil Grigorev <danil.grigorev@suse.com>
  • Loading branch information
Danil-Grigorev committed Nov 3, 2023
1 parent fdeb7bb commit 44a0c50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
- name: Sign image with cosign
uses: ./.github/workflows/release_sign
with:
image: ${{ needs.build.outputs.image || format('{0}-{1}', vars[inputs.image], inputs.arch) }}
image: ${{ inputs.secret_registry && format('{0}-{1}', vars[inputs.image], inputs.arch) || needs.build.outputs.image }}
digest: ${{ needs.build.outputs.digest }}
identity: https://github.com/${{ inputs.org }}/rancher-turtles/.github/workflows/release.yaml@refs/tags/${{ inputs.tag }}
oids-issuer: https://token.actions.githubusercontent.com
Expand All @@ -100,7 +100,7 @@ jobs:
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_container_slsa3.yml@v1.9.0
with:
digest: ${{ needs.build.outputs.digest }}
image: ${{ needs.build.outputs.image || format('{0}-{1}', vars[inputs.image], inputs.arch) }}
image: ${{ inputs.secret_registry && format('{0}-{1}', vars[inputs.image], inputs.arch) || needs.build.outputs.image }}
secrets:
registry-username: ${{ inputs.secret_registry && secrets[inputs.username] || inputs.username }}
registry-password: ${{ secrets[inputs.password] }}
3 changes: 2 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,18 @@ jobs:
matrix:
destination: [ghcr, prod]
arch: [amd64, arm64, s390x]
image: [REGISTRY_IMAGE]
include:
- destination: ghcr
registry: ghcr.io
username: ${{ github.actor }}
password: GITHUB_TOKEN
image: ghcr.io/rancher-sandbox/rancher-turtles
secret_registry: false
- destination: prod
registry: REGISTRY_ENDPOINT
username: REGISTRY_USERNAME
password: REGISTRY_PASSWORD
image: REGISTRY_IMAGE
secret_registry: true
name: Release
uses: ./.github/workflows/release-workflow.yml
Expand Down

0 comments on commit 44a0c50

Please sign in to comment.