Skip to content

Use checkout v6 and push action in workflow - #2702

Merged
jamesamcl merged 1 commit into
masterfrom
allocate_sequential_ID
May 18, 2026
Merged

jamesamcl merged 1 commit into
masterfrom
allocate_sequential_ID

Conversation

@aleixpuigb

Copy link
Copy Markdown
Collaborator

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.

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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@v6 with persist-credentials: false and fetch-depth: 0.
  • Replaces the manual git commit/git push script with actions-js/[email protected] using secrets.EFO_ID_ALLOCATION_TOKEN.
  • Removes the workflow-level permissions: contents: write block.

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."
@jamesamcl
jamesamcl merged commit acde12b into master May 18, 2026
2 checks passed
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.

3 participants