Revert "fix: Remove the user (#156)" (#168)

This reverts commit 75ba9fb1cf.
This commit is contained in:
Pascal Zimmermann
2023-05-18 10:13:05 +02:00
committed by GitHub
parent 75ba9fb1cf
commit c361e2bb07
2 changed files with 1 additions and 26 deletions

View File

@@ -86,31 +86,6 @@ jobs:
force_with_lease: true
```
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:
```yaml
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
token: ${{ secrets.PAT_TOKEN }}
- name: Commit files
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -a -m "Add changes"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.PAT_TOKEN }}
repository: Test/test
force: true
```
An example workflow to update/ overwrite an existing tag:
```yaml

View File

@@ -43,7 +43,7 @@ cd ${INPUT_DIRECTORY}
if ${INPUT_SSH}; then
remote_repo="git@${INPUT_GITHUB_URL}:${REPOSITORY}.git"
else
remote_repo="${INPUT_GITHUB_URL_PROTOCOL}//${INPUT_GITHUB_TOKEN}:x-oauth-basic@${INPUT_GITHUB_URL}/${REPOSITORY}.git"
remote_repo="${INPUT_GITHUB_URL_PROTOCOL}//${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@${INPUT_GITHUB_URL}/${REPOSITORY}.git"
fi
git config --local --add safe.directory ${INPUT_DIRECTORY}