-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
automatically apply auto-check edits on repo creation (#156)
- Loading branch information
1 parent
ffd32f8
commit c1b1f0a
Showing
5 changed files
with
97 additions
and
44 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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Initialise Repo | ||
on: | ||
push: | ||
branches: | ||
# NB: its difficult to get the default branch dynamically in | ||
# push event, so it has been hardcoded. | ||
# ${{ github.event.repository.default_branch }} does not | ||
# work in this scenario. | ||
# | ||
- master | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
run-script: | ||
name: run script | ||
|
||
# We will only run this action when this repository isn't the | ||
# template repository | ||
# | ||
if: >- | ||
${{ !github.event.repository.is_template }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Configure Git | ||
run: | | ||
git config --global user.name "${GITHUB_ACTOR}" | ||
git config --global user.email "${GITHUB_ACTOR_EMAIL}" | ||
shell: bash | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.ref }} | ||
|
||
- name: Run script | ||
run: | | ||
. ./scripts/automate-checklist.sh | ||
auto-check | ||
- name: Self destruct | ||
run: | | ||
rm -fv .github/workflows/on-init-repo-workflow.yml 2>/dev/null | ||
- name: Add files and commit changes | ||
run: | | ||
git add . | ||
git commit -m "Apply initial template edits" | ||
git push -u origin ${{ github.event.repository.default_branch }} | ||
shell: bash | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
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
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
File renamed without changes.