mirror of
https://github.com/yuaotian/go-cursor-help.git
synced 2025-06-08 04:22:06 +08:00
chore: update GitHub Actions workflows for permissions and token usage
- Changed permissions in auto-tag.yml and release.yml to 'write-all' for broader access. - Updated GITHUB_TOKEN to use RELEASE_TOKEN in both workflows for enhanced security. - Streamlined the workflows by removing redundant permission specifications.
This commit is contained in:
parent
fa53723283
commit
dff58fb4fb
14
.github/workflows/auto-tag.yml
vendored
14
.github/workflows/auto-tag.yml
vendored
@ -10,13 +10,11 @@ on:
|
|||||||
- "LICENSE"
|
- "LICENSE"
|
||||||
- ".gitignore"
|
- ".gitignore"
|
||||||
|
|
||||||
|
permissions: write-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
auto-tag:
|
auto-tag:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
issues: write
|
|
||||||
pull-requests: write
|
|
||||||
outputs:
|
outputs:
|
||||||
new_tag: ${{ steps.get_latest_tag.outputs.version }}
|
new_tag: ${{ steps.get_latest_tag.outputs.version }}
|
||||||
steps:
|
steps:
|
||||||
@ -41,7 +39,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Create new tag
|
- name: Create new tag
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
new_tag=${{ steps.get_latest_tag.outputs.version }}
|
new_tag=${{ steps.get_latest_tag.outputs.version }}
|
||||||
git config --global user.name 'github-actions[bot]'
|
git config --global user.name 'github-actions[bot]'
|
||||||
@ -52,9 +50,5 @@ jobs:
|
|||||||
release:
|
release:
|
||||||
needs: auto-tag
|
needs: auto-tag
|
||||||
uses: ./.github/workflows/release.yml
|
uses: ./.github/workflows/release.yml
|
||||||
permissions:
|
permissions: write-all
|
||||||
contents: write
|
|
||||||
packages: write
|
|
||||||
issues: write
|
|
||||||
pull-requests: write
|
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@ -6,11 +6,7 @@ on:
|
|||||||
tags:
|
tags:
|
||||||
- "v*"
|
- "v*"
|
||||||
|
|
||||||
permissions:
|
permissions: write-all
|
||||||
contents: write
|
|
||||||
packages: write
|
|
||||||
issues: write
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
goreleaser:
|
goreleaser:
|
||||||
@ -51,5 +47,5 @@ jobs:
|
|||||||
version: v1.21.2
|
version: v1.21.2
|
||||||
args: release --clean
|
args: release --clean
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
|
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user