-
Notifications
You must be signed in to change notification settings - Fork 8
45 lines (43 loc) · 1.42 KB
/
nightly_build.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
name: Trigger a nightly build
on:
workflow_dispatch:
# Trigger manually
schedule:
# Trigger daily
- cron: '0 6 * * *'
jobs:
build:
# Only trigger this for the main repository to avoid errors in forks
if: github.repository == 'scp-fs2open/nightlybuild'
runs-on: ubuntu-latest
steps:
- name: Prepare environment
run: |
git config --global user.email "SirKnightlySCP@gmail.com"
git config --global user.name "SirKnightly"
- name: Checkout nightly script
uses: actions/checkout@v2
- name: Decrypt config
env:
CONFIG_PASSWORD: ${{ secrets.CONFIG_PASSWORD }}
run: |
gpg --quiet --batch --yes --decrypt --passphrase="$CONFIG_PASSWORD" --output $GITHUB_WORKSPACE/config.yml config.github.yml.gpg
- name: Checkout FSO code
uses: actions/checkout@v2
with:
repository: scp-fs2open/fs2open.github.com
path: fs2open.github.com
ssh-key: ${{ secrets.SIRKNIGHTLY_PRIVATE_KEY }}
submodules: true
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run script
run: |
python nightly.py --config $GITHUB_WORKSPACE/config.yml