Trigger a nightly build #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-20.04 | |
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 |