-
Notifications
You must be signed in to change notification settings - Fork 31
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
Compliant Updates #56
base: main
Are you sure you want to change the base?
Conversation
@cole-h updated based on CI |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there, sorry it took me so long to get back to you! I was doing a bit of playing around with your approach, and I was able to find a slightly better approach.
@@ -119,6 +123,36 @@ runs: | |||
TARGETS: ${{ inputs.inputs }} | |||
COMMIT_MSG: ${{ inputs.commit-msg }} | |||
PATH_TO_FLAKE_DIR: ${{ inputs.path-to-flake-dir }} | |||
COMMIT_WITH_TOKEN: ${{ inputs.commit-with-token }} | |||
|
|||
- name: Commit changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than dealing with the "get a verified-by-github commit" ourselves, I would much rather call out to an action or two that do this for us. And it just so happens that there is a combination of actions we can use to get the same result:
- name: Create branch for ${{ inputs.branch }}
if: ${{ inputs.commit-with-token == 'true' }}
uses: peterjgrainger/[email protected]
env:
GITHUB_TOKEN: ${{ inputs.token }}
with:
branch: refs/heads/${{ inputs.branch }}
- name: Create GitHub-verified commit
if: ${{ inputs.commit-with-token == 'true' }}
uses: swinton/[email protected]
env:
GH_TOKEN: ${{ inputs.token }}
with:
files: |
flake.lock
commit-message: ${{ inputs.commit-msg }}
ref: refs/heads/${{ inputs.branch }}
You can see it works here: cole-h/test#7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me try this on my fork
Co-authored-by: Cole Helbling <[email protected]>
Co-authored-by: Cole Helbling <[email protected]>
Description
Optionally allow commits and PRs to be made using a token.
Documents how to use this to get verified commits and PRs that trigger further actions.
Checklist