-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! fixup! fixup! auto-update template in separate repo
- Loading branch information
1 parent
5ab5849
commit 20a4124
Showing
1 changed file
with
16 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,21 +160,31 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Generate token | ||
id: generate_token | ||
uses: actions/create-github-app-token@v1 | ||
with: | ||
app-id: ${{ secrets.APP_ID }} | ||
private-key: ${{ secrets.APP_PRIVATE_KEY }} | ||
|
||
- name: Checkout main repo | ||
uses: actions/checkout@v2 | ||
with: | ||
token: ${{ steps.generate_token.outputs.token }} | ||
|
||
- name: Push to dfir repo | ||
shell: bash | ||
run: | | ||
git -C "$DIR" init -b main -q | ||
git -C "$DIR" init -q | ||
git -C "$DIR" remote add origin "[email protected]:$GITHUB_REPOSITORY_OWNER/dfir-template.git" | ||
# git -C "$DIR" config credential.helper "$(git config credential.helper)" | ||
# git -C "$DIR" config 'http.https://github.com/.extraheader' "$(git config 'http.https://github.com/.extraheader')" | ||
git -C "$DIR" config credential.helper "$(git config credential.helper)" | ||
git -C "$DIR" config 'http.https://github.com/.extraheader' "$(git config 'http.https://github.com/.extraheader')" | ||
git -C "$DIR" config core.autocrlf input | ||
git -C "$DIR" config core.safecrlf false | ||
git -C "$DIR" config user.name "hydro-project-bot[bot]" | ||
git -C "$DIR" config user.email "132423234+hydro-project-bot[bot]@users.noreply.github.com" | ||
git -C "$DIR" add -A | ||
git -C "$DIR" -c 'user.name=github-actions[bot]' -c 'user.email=41898282+github-actions[bot]@users.noreply.github.com' \ | ||
commit -m "Update template $(date -I) $(git rev-parse HEAD)" | ||
git -C "$DIR" push -f -u origin main --quiet | ||
git -C "$DIR" commit -m "Update template $(date -I) $(git rev-parse HEAD)" | ||
git -C "$DIR" push -f -u origin HEAD:main --quiet | ||
env: | ||
DIR: template/dfir |