Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Bump Version

Copy link

Copilot AI Jun 25, 2025

Choose a reason for hiding this comment

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

Consider explicitly setting permissions: contents: write at the root or job level to ensure the action has the minimum required scope to push tags.

Suggested change
permissions:
contents: write

Copilot uses AI. Check for mistakes.
on:
workflow_dispatch:

jobs:
bump_version:
name: Bump Version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Set branch name
id: extract_branch
run: echo "::set-output name=branch_name::$(echo ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}})"
- name: Bump version and push tag
id: bump_version
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
WITH_V: true
DEFAULT_BUMP: patch
PRERELEASE: true
RELEASE_BRANCHES: ${{ steps.extract_branch.outputs.branch_name }}
Comment on lines +8 to +25

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 4 months ago

To fix the issue, we will add a permissions block at the root of the workflow file. This block will specify the least privileges required for the workflow to function correctly. Based on the workflow's steps, it needs to read repository contents and push tags, which requires contents: write. We will add this block to the top level of the workflow, ensuring it applies to all jobs.


Suggested changeset 1
.github/workflows/bump-version.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml
--- a/.github/workflows/bump-version.yml
+++ b/.github/workflows/bump-version.yml
@@ -2,6 +2,7 @@
 
+permissions:
+  contents: write
+
 on:
   workflow_dispatch:
-    
-jobs:
   bump_version:
EOF
@@ -2,6 +2,7 @@

permissions:
contents: write

on:
workflow_dispatch:

jobs:
bump_version:
Copilot is powered by AI and may make mistakes. Always verify output.
Loading