fix: Cater for corner case of repo created freshly from template #34
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
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/update-gha.yaml' | |
- 'template/**' | |
name: Update GHA in remote repositories | |
jobs: | |
create_key: | |
runs-on: ubuntu-22.04 | |
name: Update GHA in remote repositories | |
steps: | |
- name: Check out remote repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.TOKEN_KEYS }} | |
- name: Configure Git identity | |
run: | | |
git log HEAD^.. --pretty=format:"git config --global user.name '%an' && git config --global user.email '%ae'" | tee /dev/stderr | sh | |
- name: Update | |
run: | | |
./run.sh copy_templates |