generated from 42cursus-youkim/project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (30 loc) · 892 Bytes
/
defense.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
33
34
35
36
37
38
39
name: publish defense
on:
push:
branches: [main]
workflow_dispatch:
jobs:
publish-defense:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: switch to defense branch
run: |
git checkout --orphan defense
this=$(git symbolic-ref --short -q HEAD)
if [[ $this != defense ]]; then
echo $this is not defense; exit 1
fi
- name: merge main
run: git merge --allow-unrelated-histories main
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: install dependencies
run: pip install -U pip flupy docopt
- name: nuke files not allowed in subject
run: python3 nuke.py --execute asset/
- name: commit and push
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: defense