Skip to content

Commit d7c7f62

Browse files
Give write permissions to commit job only
1 parent 4fdec82 commit d7c7f62

1 file changed

Lines changed: 18 additions & 2 deletions

File tree

.github/workflows/update.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ on:
33
workflow_dispatch:
44
schedule:
55
- cron: '38 6 * * *'
6+
permissions:
7+
contents: read
68
jobs:
79
update:
810
runs-on: ubuntu-latest
@@ -42,9 +44,23 @@ jobs:
4244
fi
4345
mv /tmp/new.json $oldfile
4446
done
47+
- uses: actions/upload-artifact@v4
48+
with:
49+
name: platform-complete
50+
path: platform-complete/
51+
retention-days: 1
52+
commit:
53+
needs: [update]
54+
runs-on: ubuntu-latest
55+
permissions:
56+
contents: write
57+
steps:
58+
- uses: actions/checkout@v4
59+
- run: rm -r platform-complete/
60+
- uses: actions/download-artifact@v4
4561
- name: Commit updates
4662
run: |
47-
git config --local user.name 'Translation update bot of Julian Ladisch'
48-
git config --local user.email 'julianladisch@users.noreply.github.com'
63+
git config --local user.name 'folio-translations repository bot'
64+
git config --local user.email 'folio-translations@users.noreply.github.com'
4965
git add platform-complete/
5066
(git commit -m "Update translations" && git push) || true # ignore failure caused by unchanged files

0 commit comments

Comments
 (0)