romeo #12
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: romeo | |
on: | |
workflow_dispatch: | |
jobs: | |
job_one: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Grab the project source | |
uses: actions/checkout@v3 | |
- name: Setup conda environment | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
mamba-version: "*" | |
environment-file: environment.yml | |
- name: Build Conda Package | |
run: | | |
# boa uses mamba to resolve dependencies | |
cd ./conda.recipe | |
VERSION="$(versioningit ../)" conda mambabuild --output-folder . . | |
- name: Verify Conda Package | |
run: | | |
conda verify conda.recipe/noarch/brucejack*.tar.bz2 | |
- name: Publish to Anaconda.org | |
env: | |
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }} | |
run: | | |
anaconda upload --label main conda.recipe/noarch/brucejack*.tar.bz2 | |
job_two: | |
needs: [ job_one ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: invoke pre-deploy trigger for brucejack | |
run: | | |
curl -X POST --fail \ | |
-F token=${{ secrets.PREDEPLOY_TOKEN }} \ | |
-F ref=main \ | |
-F variables[ENVIRONMENT]=prod \ | |
https://code.ornl.gov/api/v4/projects/16319/trigger/pipeline | |
# EWM story 5173 | |
# on merge feature_br into next -> trigger predeploy | |
# on rc tag create in qa -> trigger predeploy | |
# on tag release in main -> trigger predeploy | |
# ??? | |
# on merge main -> push prod | |
# on merge rc -> push NP/qa | |
# on merge dev -> push NP/dev | |