fix workflow permission
This commit is contained in:
@@ -10,17 +10,23 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
get-version:
|
get-version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout repository
|
||||||
with:
|
uses: actions/checkout@v4
|
||||||
token: ${{ secrets.REPO_SCOPED_TOKEN }}
|
|
||||||
- name: Fetch release version
|
- name: Fetch release version
|
||||||
run: |
|
run: |
|
||||||
curl -sL https://api.github.com/repos/actualbudget/actual/releases/latest | \
|
curl -sL https://api.github.com/repos/actualbudget/actual/releases/latest | \
|
||||||
jq -r ".tag_name" > actual-latest.txt
|
jq -r ".tag_name" > actual-latest.txt
|
||||||
|
|
||||||
- name: Check for modified files
|
- name: Check for modified files
|
||||||
id: git-check
|
id: git-check
|
||||||
run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")
|
run: echo ::set-output name=modified::$([ -z "`git status --porcelain`" ] && echo "false" || echo "true")
|
||||||
|
|
||||||
- name: Commit latest release version
|
- name: Commit latest release version
|
||||||
if: steps.git-check.outputs.modified == 'true'
|
if: steps.git-check.outputs.modified == 'true'
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user