File tree Expand file tree Collapse file tree 1 file changed +6
-14
lines changed Expand file tree Collapse file tree 1 file changed +6
-14
lines changed Original file line number Diff line number Diff line change 11
11
jobs :
12
12
format-code :
13
13
runs-on : ubuntu-latest
14
+ permissions :
15
+ contents : write
14
16
steps :
15
- - name : Retrieve secrets from Keeper
16
- id : ksecrets
17
- uses : Keeper-Security/ksm-action@master
18
- with :
19
- keeper-secret-config : ${{ secrets.KSM_CONFIG }}
20
- secrets : |-
21
- v2h4jKiZlJywDSoKzRMnRw/field/Access Token > env:PAT # Fetch PAT and store in environment variable
22
-
23
17
- name : Checkout code
24
18
uses : actions/checkout@v4
25
19
with :
@@ -58,15 +52,13 @@ jobs:
58
52
done
59
53
60
54
- name : Commit and push changes
61
- env :
62
- PAT : ${{ env.PAT }} # Use PAT fetched from Keeper
63
55
run : |
64
56
HAS_CHANGES=$(git diff --staged --name-only)
65
57
if [ ${#HAS_CHANGES} -gt 0 ]; then
66
- git config --global user.name mlcommons- bot
67
- git config --global user.email "mlcommons- [email protected] "
58
+ git config --global user.name github-actions[ bot]
59
+ git config --global user.email "github-actions[ bot] @users.noreply.github.com"
68
60
# Commit changes
69
61
git commit -m '[Automated Commit] Format Codebase'
70
- # Use the PAT to push changes
71
- git push https://x-access-token:${PAT}@github.com/${{ github.repository }} HEAD:${{ github.ref_name }}
62
+ # Use the GITHUB_TOKEN to push changes
63
+ git push
72
64
fi
You can’t perform that action at this time.
0 commit comments