generated from web-illinois/toolkit-template
-
Notifications
You must be signed in to change notification settings - Fork 1
31 lines (29 loc) · 1.03 KB
/
templating.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Apply caz templating
on: [push]
jobs:
run-caz:
# Avoid running more than once
if: ${{ github.repository != 'web-illinois/toolkit-template' && github.repository != 'marvel-uiuc/template-ilw' && github.run_number == 1 }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Apply caz template
run: npx -y caz ./ output --name ${{ github.event.repository.name }} --repository ${{ github.repository }}
- name: Commit template changes
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
rm -rf template index.js .gitignore package-lock.json README.md
cp -rT output .
rm -rf output
git add -A
git commit -a -m "chore: init template"
git push --force