Skip to content

Commit

Permalink
Resolve issue with CONTAINER_DIGEST var in ci
Browse files Browse the repository at this point in the history
Co-authored-by: Jeroen Knoops <jeroen.knoops@philips.com>
Signed-off-by: Marco Franssen <marco.franssen@philips.com>
  • Loading branch information
marcofranssen and JeroenKnoops committed Dec 24, 2021
1 parent 8778fdc commit 60802d7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,10 @@ jobs:
id: container_info
if: startsWith(github.ref, 'refs/tags/')
run: |
echo "::set-output name=container_digest::$(make container-digest GITHUB_REF=${{ github.ref_name }})"
echo "::set-output name=container_tags::$(make container-tags CONTAINER_DIGEST=${{ steps.container_info.outputs.container_digest }} | paste -s -d ',' -)"
echo "::set-output name=container_repos::$(echo "[$(make container-repos CONTAINER_DIGEST=${{ steps.container_info.outputs.container_digest }} | paste -s -d ',' -)]")"
export CONTAINER_DIGEST=$(make container-digest GITHUB_REF=${{ github.ref_name }})
echo "::set-output name=container_digest::$CONTAINER_DIGEST"
echo "::set-output name=container_tags::$(make container-tags CONTAINER_DIGEST="${CONTAINER_DIGEST}" | paste -s -d ',' -)"
echo "::set-output name=container_repos::$(make container-repos CONTAINER_DIGEST="${CONTAINER_DIGEST}" | jq --raw-input . | jq --slurp -c)"
- name: Logout from Container registries
if: ${{ always() }}
Expand All @@ -140,10 +141,7 @@ jobs:
with:
command: generate
subcommand: container
arguments: |
--digest ${{ needs.release.outputs.container_digest }} \
--tags ${{ needs.release.outputs.container_tags }} \
--repositories ${{ matrix.repo }}
arguments: --digest ${{ needs.release.outputs.container_digest }} --tags ${{ needs.release.outputs.container_tags }} --repositories ${{ matrix.repo }}

env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
Expand All @@ -160,9 +158,6 @@ jobs:
with:
command: generate
subcommand: github-release
arguments: |
--artifact-path release-assets \
--output-path provenance.json \
--tag-name ${{ github.ref_name }}
arguments: --artifact-path release-assets --output-path provenance.json --tag-name ${{ github.ref_name }}
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
4 changes: 1 addition & 3 deletions .github/workflows/example-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ jobs:
with:
command: generate
subcommand: files
arguments: |
--artifact-path artifact/ \
--output-path provenance.json
arguments: --artifact-path artifact/ --output-path provenance.json

- name: Upload provenance
uses: actions/upload-artifact@v2
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,7 @@ The easiest way to use this action is to add the following into your workflow fi
with:
command: generate
subcommand: files
arguments: |
--artifact-path release-assets \
--output-path 'provenance.json' \
--tag-name: ${{ github.ref_name }}
arguments: --artifact-path release-assets --output-path 'provenance.json' --tag-name: ${{ github.ref_name }}
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
```
Expand Down

0 comments on commit 60802d7

Please sign in to comment.