[add] Initialization script & action of GitHub template repository #1
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
name: Template Repository initialization | |
on: | |
push: | |
branches: | |
- main | |
env: | |
TEMPLATE_OWNER: EasyWebApp | |
TEMPLATE_NAME: WebCell-scaffold | |
jobs: | |
replace-repository-name: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- if: github.repository != format('{0}/{1}', env.TEMPLATE_OWNER, env.TEMPLATE_NAME) | |
run: | | |
sh .github/workflows/replace-repository-name.sh \ | |
${{ env.TEMPLATE_OWNER }} ${{ env.TEMPLATE_NAME }} \ | |
${{ github.repository_owner }} ${{ github.event.repository.name }} | |
rm -f .github/workflows/init-template.yml | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: '[fix] replace Repository Name' |