Merge branch 'master' into master
This commit is contained in:
12
README.md
12
README.md
@ -14,10 +14,16 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
...
|
||||
- run: |
|
||||
- name: Create local changes
|
||||
run: |
|
||||
...
|
||||
- uses: ad-m/github-push-action@master
|
||||
- name: Commit files
|
||||
run: |
|
||||
git config --local user.email "action@github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
git commit -m "Add changes" -a
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
|
6
start.sh
6
start.sh
@ -19,8 +19,6 @@ fi
|
||||
|
||||
cd ${INPUT_DIRECTORY}
|
||||
|
||||
# Ensure that the remote of the git repository of the current directory still is the repository where the github action is executed
|
||||
git remote add origin https://github.com/${REPOSITORY} || git remote set-url origin https://github.com/${REPOSITORY} || true
|
||||
remote_repo="https://${GITHUB_ACTOR}:${INPUT_GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
|
||||
|
||||
header=$(echo -n "ad-m:${INPUT_GITHUB_TOKEN}" | base64)
|
||||
git -c http.extraheader="AUTHORIZATION: basic $header" push origin HEAD:${INPUT_BRANCH} --follow-tags $_FORCE_OPTION;
|
||||
git push "${remote_repo}" HEAD:${INPUT_BRANCH} --follow-tags $_FORCE_OPTION;
|
||||
|
Reference in New Issue
Block a user