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

🤖 Automatically create GH release after cnspec bump #271

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

czunker
Copy link
Contributor

@czunker czunker commented Jun 10, 2024

To trigger the actual release workflow after this one, we need to use a non-generic token.

Additionally, check whether the release workflow actually created a file.

To trigger the actual release workflow after this one, we need to use a non-generic token.

Additionally, check whether the release workflow actually created a file.

Signed-off-by: Christian Zunker <[email protected]>
tag_name: ${{ env.RELEASE_VERSION }}
generate_release_notes: true
make_latest: true
token: ${{ secrets.PACKER_PLUGIN_DEPLOY_KEY_PRIV }}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need a specific token to bypass GH limitations on the GITHUB_TOKEN to trigger subsequent workflow runs.

max_attempts: 60
retry_on: error
# error on HTTP code different to 302
command: curl -o /dev/null -s -w "%{http_code}\n" "https://github.com/mondoohq/packer-plugin-cnspec/releases/download/${{ env.RELEASE_VERSION }}/packer-plugin-cnspec_${{ env.RELEASE_VERSION }}_SHA256SUMS" | grep 302
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't find an easy way to query the workflow itself. When the workflow is done, we should have this file.

@benr
Copy link
Member

benr commented Jul 15, 2024

@czunker Discord URL added.

@czunker czunker merged commit 9d92ed5 into main Jul 16, 2024
5 checks passed
@czunker czunker deleted the czunker/gh_release_v2 branch July 16, 2024 03:58
@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants