Skip to content

Commit 75ba9fb

Browse files
authored
fix: Remove the user (#156)
* fix: Remove the user * doc: Adjust the documentation * fix: Add empty line at the end of the file
1 parent 0fafdd6 commit 75ba9fb

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

‎README.md‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,31 @@ jobs:
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+
89114
An example workflow to update/ overwrite an existing tag:
90115
91116
```yaml

‎start.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ cd ${INPUT_DIRECTORY}
4343
if ${INPUT_SSH}; then
4444
remote_repo="git@${INPUT_GITHUB_URL}:${REPOSITORY}.git"
4545
else
46-
remote_repo="${INPUT_GITHUB_URL_PROTOCOL}//${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@${INPUT_GITHUB_URL}/${REPOSITORY}.git"
46+
remote_repo="${INPUT_GITHUB_URL_PROTOCOL}//${INPUT_GITHUB_TOKEN}:x-oauth-basic@${INPUT_GITHUB_URL}/${REPOSITORY}.git"
4747
fi
4848

4949
git config --local --add safe.directory ${INPUT_DIRECTORY}

0 commit comments

Comments
 (0)