Repository navigation
Use checkout v6 and push action in workflow - #2702
Merged
Merged
Conversation
Update the allocate-definitive-ids GitHub Actions workflow to use actions/checkout@v6 with persist-credentials: false and fetch-depth: 0, and replace the manual git commit/push step with actions-js/[email protected] using a dedicated secret token. The top-level permissions block (contents: write) was removed since the push now uses the provided EFO_ID_ALLOCATION_TOKEN. These changes improve security and reliability when committing allocated IDs back to the repo.
There was a problem hiding this comment.
Pull request overview
Updates the allocate-definitive-ids GitHub Actions workflow to improve how the repo is checked out and how allocated IDs are committed/pushed back, moving from an inline git script to an action-based push using a dedicated secret token.
Changes:
- Switches checkout to
actions/checkout@v6withpersist-credentials: falseandfetch-depth: 0. - Replaces the manual
git commit/git pushscript withactions-js/[email protected]usingsecrets.EFO_ID_ALLOCATION_TOKEN. - Removes the workflow-level
permissions: contents: writeblock.
| contents: write | ||
|
|
||
| jobs: | ||
| assign_ids: |
Comment on lines
35
to
+40
| - name: Commit and push changes | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
| git add src/ontology/efo-edit.owl | ||
| if git diff --cached --quiet; then | ||
| echo "No temporary IDs to replace." | ||
| exit 0 | ||
| fi | ||
| git commit -m "Replace temporary EFO IDs by definitive IDs." | ||
| git push | ||
| uses: actions-js/[email protected] | ||
| with: | ||
| github_token: ${{ secrets.EFO_ID_ALLOCATION_TOKEN }} | ||
| message: "Replace temporary IDs by definitive IDs." | ||
| branch: ${{ github.ref }} |
| with: | ||
| github_token: ${{ secrets.EFO_ID_ALLOCATION_TOKEN }} | ||
| message: "Replace temporary IDs by definitive IDs." | ||
| branch: ${{ github.ref }} |
Comment on lines
35
to
+39
| - name: Commit and push changes | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
| git add src/ontology/efo-edit.owl | ||
| if git diff --cached --quiet; then | ||
| echo "No temporary IDs to replace." | ||
| exit 0 | ||
| fi | ||
| git commit -m "Replace temporary EFO IDs by definitive IDs." | ||
| git push | ||
| uses: actions-js/[email protected] | ||
| with: | ||
| github_token: ${{ secrets.EFO_ID_ALLOCATION_TOKEN }} | ||
| message: "Replace temporary IDs by definitive IDs." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update the allocate-definitive-ids GitHub Actions workflow to use actions/checkout@v6 with persist-credentials: false and fetch-depth: 0, and replace the manual git commit/push step with actions-js/[email protected] using a dedicated secret token. The top-level permissions block (contents: write) was removed since the push now uses the provided EFO_ID_ALLOCATION_TOKEN. These changes improve security and reliability when committing allocated IDs back to the repo.