Skip to content

Commit 4cab1bb

Browse files
authored
Follow Security Guide to update release.yml (FreeRTOS#1293)
1 parent 6615f80 commit 4cab1bb

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/auto-release.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,17 @@ jobs:
3838
fetch-depth: 0
3939

4040
- name: Release
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
ACTOR: ${{ github.actor }}
44+
COMMIT_ID: ${{ github.event.inputs.commit_id }}
45+
VERSION_NUMBER: ${{ github.event.inputs.version_number }}
4146
run: |
4247
# Configure repo for push
43-
git config --global user.name ${{ github.actor }}
44-
git config --global user.email ${{ github.actor }}@users.noreply.github.com
48+
git config --global user.name "$ACTOR"
49+
git config --global user.email "$ACTOR"@users.noreply.github.com
4550
4651
# Run the release script
4752
pip install -r ./tools/.github/scripts/release-requirements.txt
48-
./tools/.github/scripts/release.py FreeRTOS --core-repo-path=local_core --core-commit=${{ github.event.inputs.commit_id }} --new-core-version=${{ github.event.inputs.version_number }}
53+
./tools/.github/scripts/release.py FreeRTOS --core-repo-path=local_core --core-commit="$COMMIT_ID" --new-core-version="$VERSION_NUMBER"
4954
exit $?
50-
env:
51-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)