*fix: Remove the user (#169)
*doc: Adjust the documentation *fix: Add empty line at the end of the file
This commit is contained in:
parent
c361e2bb07
commit
df39337088
25
README.md
25
README.md
@ -86,6 +86,31 @@ jobs:
|
|||||||
force_with_lease: true
|
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:
|
An example workflow to update/ overwrite an existing tag:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
2
start.sh
2
start.sh
@ -43,7 +43,7 @@ cd ${INPUT_DIRECTORY}
|
|||||||
if ${INPUT_SSH}; then
|
if ${INPUT_SSH}; then
|
||||||
remote_repo="git@${INPUT_GITHUB_URL}:${REPOSITORY}.git"
|
remote_repo="git@${INPUT_GITHUB_URL}:${REPOSITORY}.git"
|
||||||
else
|
else
|
||||||
remote_repo="${INPUT_GITHUB_URL_PROTOCOL}//${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@${INPUT_GITHUB_URL}/${REPOSITORY}.git"
|
remote_repo="${INPUT_GITHUB_URL_PROTOCOL}//oauth2:${INPUT_GITHUB_TOKEN}@${INPUT_GITHUB_URL}/${REPOSITORY}.git"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git config --local --add safe.directory ${INPUT_DIRECTORY}
|
git config --local --add safe.directory ${INPUT_DIRECTORY}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user