Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automated replacing a string of auto-pr.ps1 #12

Merged
merged 5 commits into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 1 addition & 15 deletions .github/workflows/template-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,10 @@ jobs:
with:
token: ${{ steps.generate_token.outputs.token }}
- name: actions-template-sync
id: actions_template_sync
uses: AndreasAugustin/actions-template-sync@v0.8.0
with:
github_token: ${{ steps.generate_token.outputs.token }}
source_repo_path: ScoopInstaller/BucketTemplate
upstream_branch: master
is_allow_hooks: true
# pr_labels: <label1>,<label2>[,...] # optional, no default
- name: "[debug] dump steps"
run: echo '${{ toJSON(steps) }}'
- name: Find and Replace
uses: jacobtomlinson/gha-find-replace@v3
with:
find: "<username>/<bucketname>"
replace: "ppyv/scoop-jp-fonts"
include: bin/auto-pr.ps1
regex: false
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ steps.generate_token.outputs.token }}
branch: ${{ github.head_ref }}
7 changes: 7 additions & 0 deletions templatesync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
hooks:
prepush:
commands:
- echo 'replacing placeholder'
- sed -i s/<username>\/<bucketname>/ppyv\/scoop-jp-fonts/g bin/auto-pr.ps1
- git add bin/auto-pr.ps1
- git commit -m placeholder