-
Notifications
You must be signed in to change notification settings - Fork 47
54 lines (52 loc) · 2 KB
/
compile_changelogs.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Compile changelogs
on:
schedule:
- cron: "0 0 * * *"
jobs:
compile:
name: "Compile changelogs"
runs-on: ubuntu-20.04
if: github.repository == 'Occulus-Server/Occulus-Eris' # Occulus Edit - stops workflow from running on forks
steps:
- name: "Check for CHANGELOG_ENABLER secret and pass true to output if it exists to be checked by later steps"
id: value_holder
env:
CHANGELOG_ENABLER: ${{ secrets.CHANGELOG_ENABLER }}
run: |
unset SECRET_EXISTS
if [ -n $CHANGELOG_ENABLER ]; then SECRET_EXISTS='true' ; fi
echo ::set-output name=CL_ENABLED::${SECRET_EXISTS}
- name: "Setup python"
if: steps.value_holder.outputs.CL_ENABLED
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: "Install deps"
if: steps.value_holder.outputs.CL_ENABLED
run: |
python -m pip install --upgrade pip
python -m pip install pyyaml bs4
sudo apt-get install dos2unix
- name: "Checkout"
if: steps.value_holder.outputs.CL_ENABLED
uses: actions/checkout@v1
with:
fetch-depth: 25
- name: "Compile"
if: steps.value_holder.outputs.CL_ENABLED
run: |
python tools/changelog/ss13_genchangelog.py html/changelog.html html/changelogs
- name: Commit
if: steps.value_holder.outputs.CL_ENABLED
run: |
git config --local user.email "[email protected]"
git config --local user.name "Changelogs"
git pull origin master
git add html/changelogs
git commit -m "Automatic changelog compile [ci skip]" -a || true
- name: "Push"
if: steps.value_holder.outputs.CL_ENABLED
uses: ad-m/github-push-action@master
with:
#github_token: ${{ secrets.GITHUB_TOKEN }} Occulus Edit - Allows this action to directly merge to master (with next line)
github_token: ${{ secrets.CL_TOKEN }} # Occulus Edit ^