-
-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add pre-release workflow * Add spec job * Test download artifact action * Add conditional statement to pull_request job * Test push to fork branch * Trying create pull request action * Comment out reviewers and labels * Simpler job for lockfiles * Change setup in lock job * Ready to open a PR * Remove old workflows * Add commit message * Minor changes * Change lock type * Minor changes * Rename lock file in zenodo job * Remove changelog from pre-release * Fix conditional * Remove `automated` label
- Loading branch information
Showing
3 changed files
with
120 additions
and
129 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
# For more information about TARDIS pipelines, please refer to: | ||
# | ||
# https://tardis-sn.github.io/tardis/development/continuous_integration.html | ||
|
||
name: pre-release | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * 0' | ||
|
||
workflow_dispatch: # manual trigger | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
jobs: | ||
lock: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup environment | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
miniforge-variant: Mambaforge | ||
miniforge-version: latest | ||
auto-activate-base: true | ||
activate-environment: "" | ||
use-mamba: true | ||
|
||
- name: Install conda-lock | ||
run: mamba install -c conda-forge conda-lock=1.0.5 | ||
|
||
- name: Generate lockfiles | ||
run: | | ||
conda-lock -f tardis_env3.yml -p linux-64 -p osx-64 | ||
conda lock render conda-lock.yml | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: lockfiles | ||
path: | | ||
conda-linux-64.lock | ||
conda-osx-64.lock | ||
conda-lock.yml | ||
zenodo: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
repository: tardis-sn/tardis_zenodo | ||
token: ${{ secrets.BOT_TOKEN }} | ||
|
||
- name: Dump Secret Key | ||
run: echo "$KEY_SECRET_JSON" > key_secret.json | ||
env: | ||
KEY_SECRET_JSON: ${{ secrets.ZENODO_KEY_SECRET_JSON }} | ||
|
||
- name: Setup environment | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
miniforge-variant: Mambaforge | ||
miniforge-version: latest | ||
environment-file: conda-linux-64.lock | ||
activate-environment: tardis_zenodo | ||
use-mamba: true | ||
|
||
- name: Run Notebook | ||
run: jupyter nbconvert gather_data.ipynb --to html --execute --ExecutePreprocessor.timeout=6000 | ||
|
||
- name: Run Notebook (allow errors) | ||
run: jupyter nbconvert gather_data.ipynb --to html --execute --ExecutePreprocessor.timeout=6000 --allow-errors | ||
if: failure() | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: zenodo_json | ||
path: .zenodo.json | ||
|
||
pull_request: | ||
needs: [lock, zenodo] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/download-artifact@v3 | ||
with: | ||
path: /tmp | ||
|
||
- name: Copy files to repository | ||
run: | | ||
cp /tmp/lockfiles/conda-linux-64.lock . | ||
cp /tmp/lockfiles/conda-osx-64.lock . | ||
cp /tmp/lockfiles/conda-lock.yml . | ||
cp /tmp/zenodo_json/.zenodo.json . | ||
- name: Get current date | ||
run: echo "DATE=$(date +'%Y.%m.%d')" >> $GITHUB_ENV | ||
|
||
- uses: peter-evans/create-pull-request@v4 | ||
with: | ||
token: ${{ secrets.BOT_TOKEN }} | ||
committer: TARDIS Bot <[email protected]> | ||
author: TARDIS Bot <[email protected]> | ||
branch: pre-release-${{ env.DATE }} | ||
push-to-fork: tardis-bot/tardis | ||
commit-message: Automated changes for pre-release ${{ env.DATE }} | ||
title: Pre-release ${{ env.DATE }} | ||
body: | | ||
*\*beep\* \*bop\** | ||
Hi, human. | ||
I prepared everything for a new TARDIS release. | ||
If all **checks pass**, merge this pull request and I'll do the rest. | ||
labels: build-docs, CI-CD, priority - high :fire:, | ||
reviewers: wkerzendorf, andrewfullard, epassaro |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.