Skip to content

Commit 97d4576

Browse files
authored
Merge pull request #2 from damoun/chore/improve-workflow-security
chore: improve workflow security by using native git
2 parents eb89aef + 6823b97 commit 97d4576

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

‎.github/workflows/update-json.yml‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,17 @@ jobs:
1616
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1717
with:
1818
ref: ${{ github.head_ref || github.ref_name }}
19-
persist-credentials: false
2019
- uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31.10.6
2120
- name: Run update script
2221
run: ./update.sh
2322
- name: Commit changes
24-
uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 # v5.1.0
25-
with:
26-
commit_message: "chore: update versions.json"
27-
file_pattern: "versions.json"
23+
run: |
24+
if ! git diff --quiet versions.json; then
25+
git config --global user.name "github-actions[bot]"
26+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
27+
git add versions.json
28+
git commit -m "chore: update versions.json"
29+
git push
30+
else
31+
echo "No changes to commit."
32+
fi

0 commit comments

Comments
 (0)