Deploy MSlice nightly #969
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: Deploy MSlice nightly | |
on: | |
workflow_run: | |
workflows: ["MSlice nightly build"] | |
branches: [main] | |
types: | |
- completed | |
jobs: | |
build_conda_and_upload: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout MSlice | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
ref: main | |
- name: Check for changes since last build | |
run: | | |
echo "recentCommits=$(test -z $(git log --since="yesterday" -1 --format=%h) && echo false || echo true)" >> $GITHUB_ENV | |
- name: Setup Miniconda | |
if: ${{ env.recentCommits == 'true'}} | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-version: latest | |
miniforge-variant: Mambaforge | |
activate-environment: mslice-env | |
environment-file: environment.yml | |
auto-activate-base: false | |
- name: Build MSlice nightly conda package | |
if: ${{ env.recentCommits == 'true'}} | |
uses: ./.github/actions/publish-package | |
with: | |
label: nightly | |
token: ${{ secrets.ANACONDA_API_TOKEN }} |