File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed
Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 8686 force_with_lease : true
8787` ` `
8888
89+ An example workflow to use the non default token push to another repository. Be aware that the force-with-lease flag is in such a case not possible:
90+
91+ ` ` ` yaml
92+ jobs :
93+ build :
94+ runs-on : ubuntu-latest
95+ steps :
96+ - uses : actions/checkout@v3
97+ with :
98+ ref : ${{ github.head_ref }}
99+ fetch-depth : 0
100+ token : ${{ secrets.PAT_TOKEN }}
101+ - name : Commit files
102+ run : |
103+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
104+ git config --local user.name "github-actions[bot]"
105+ git commit -a -m "Add changes"
106+ - name : Push changes
107+ uses : ad-m/github-push-action@master
108+ with :
109+ github_token : ${{ secrets.PAT_TOKEN }}
110+ repository : Test/test
111+ force : true
112+ ` ` `
113+
89114An example workflow to update/ overwrite an existing tag:
90115
91116` ` ` yaml
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ cd ${INPUT_DIRECTORY}
4343if ${INPUT_SSH} ; then
4444 remote_repo=" git@${INPUT_GITHUB_URL} :${REPOSITORY} .git"
4545else
46- remote_repo=" ${INPUT_GITHUB_URL_PROTOCOL} //${GITHUB_ACTOR} :${INPUT_GITHUB_TOKEN} @${INPUT_GITHUB_URL} /${REPOSITORY} .git"
46+ remote_repo=" ${INPUT_GITHUB_URL_PROTOCOL} //oauth2 :${INPUT_GITHUB_TOKEN} @${INPUT_GITHUB_URL} /${REPOSITORY} .git"
4747fi
4848
4949git config --local --add safe.directory ${INPUT_DIRECTORY}
You can’t perform that action at this time.
0 commit comments