Switch to branch and setup remote origin
This commit is contained in:
parent
6280a31960
commit
fdf062fc1c
@ -52,6 +52,7 @@ New GitHub Actions syntax:
|
||||
commit_author_name: John Doe
|
||||
commit_message: Apply automatic changes
|
||||
env:
|
||||
TOKEN: ${{ secrets.TOKEN }} # Personal Access Token
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
|
||||
|
@ -1,6 +1,12 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
# Switch to branch from current Workflow run
|
||||
git switch "${GITHUB_REF:11}"
|
||||
|
||||
# Set origin URL
|
||||
git remote set-url origin https://$TOKEN:x-oauth-basic@github.com/$GITHUB_REPOSITORY
|
||||
|
||||
git config --global user.email "actions@github.com"
|
||||
git config --global user.name "GitHub Actions"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user