Skip to content

Merge pull request #138 from haileyajohnson/data-dir #83

Merge pull request #138 from haileyajohnson/data-dir

Merge pull request #138 from haileyajohnson/data-dir #83

Workflow file for this run

name: Build
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow}}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
# Build configs after running some simple checks
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3
uses: actions/setup-python@v2
with:
python-version: 3.x
cache: 'pip'
- run: python -m pip install -r ci/requirements.txt
- name: Run basic checks
run: python -m pytest basic_checks.py
- name: Build config packages
run: python build.py
- name: Upload configs as artifact
uses: actions/upload-artifact@v2
with:
name: configs
path: '*/config.zip'
retention-days: 5
# Download artifact and upload to Unidata artifacts server
upload:
if: ${{ github.event_name != 'pull_request' }}
name: Upload to artifacts
needs: build
environment:
name: Unidata Artifacts
url: https://artifacts.unidata.ucar.edu/#browse/browse:downloads-tds-config
runs-on: ubuntu-latest
steps:
- name: Download configs
uses: actions/download-artifact@v2
with:
name: configs
- name: Upload config files
run: >
find . -name config.zip -exec
curl -u ${{ secrets.NEXUS_USER }}:${{ secrets.NEXUS_PW }}
--upload-file "{}" https://artifacts.unidata.ucar.edu/repository/downloads-tds-config/"{}" \;