Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: docker-publish.yml cosign command line args when multiple tags are present #1622

Merged
merged 2 commits into from
Jul 27, 2022
Merged

Conversation

jamesmoore
Copy link
Contributor

With scheduled builds the output docker image has two tags - branch name (eg, main) and nightly.

The current template is passing these as a single argument into the cosign sign command. This is causing failures of the workflow when run with a scheduled trigger.

This change splits them using xargs and runs multiple cosign commands, one for each tag.

Tested by running against one of my own repos, eg: https://github.com/jamesmoore/mp3info/runs/7087514897?check_suite_focus=true#step:8:2

Copy link

@arnuphong arnuphong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i-am-gizm0 added a commit to i-am-gizm0/svelte-gallery that referenced this pull request Jul 23, 2022
A known issue in this workflow: actions/starter-workflows#1620 - images with multiple tags fail to sign because the tags span multiple lines.
This is the fix proposed in actions/starter-workflows#1622
i-am-gizm0 added a commit to i-am-gizm0/svelte-gallery that referenced this pull request Jul 23, 2022
* Replace old Docker build test with build on PR and push on schedule and release

* Fix commit signing
A known issue in this workflow: actions/starter-workflows#1620 - images with multiple tags fail to sign because the tags span multiple lines.
This is the fix proposed in actions/starter-workflows#1622
Copy link

@CJCShadowsan CJCShadowsan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me.

Copy link
Contributor

@Phantsure Phantsure left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to fix an issue. Confirmed my different people

@Phantsure Phantsure merged commit 263b18d into actions:main Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants