-
Notifications
You must be signed in to change notification settings - Fork 2
32 lines (30 loc) · 995 Bytes
/
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
32
name: Apply caz templating
on: [push]
jobs:
run-caz:
# Avoid running in the host repo
if: ${{ github.repository != 'marvel-uiuc/template-ilw' }}
runs-on: ubuntu-latest
permissions:
contents: write
actions: 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 .github template index.js .gitignore package-lock.json
cp -rT output .
rm -rf output
git add -A
git commit -a -m "chore: init template"
git push --force