Merge pull request #26 from ooi-data/bugfix/stream_dict-json-keyerror #74
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: Pipeline Registration | |
on: | |
push: | |
branches: | |
- "main" | |
workflow_dispatch: | |
env: | |
PYTHON_VERSION: "3.8" | |
CONDA_ENV: harvester | |
PREFECT_PROJECT: ooi-harvest | |
ENV_FILE: .ci/environment.yaml | |
jobs: | |
register: | |
name: Register Prefect Flow | |
runs-on: ubuntu-20.04 | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
token: ${{ secrets.GH_PAT }} | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Setup micromamba | |
uses: mamba-org/provision-with-micromamba@v14 | |
with: | |
environment-file: ${{ env.ENV_FILE }} | |
environment-name: ${{ env.CONDA_ENV }} | |
cache-env: false | |
- name: Print conda env | |
run: | | |
conda info | |
conda list | |
- name: Run flow registration | |
run: | | |
# Make prefect dir | |
mkdir ~/.prefect | |
# Login | |
###prefect auth login --key ${{ secrets.PREFECT_TOKEN }} | |
# Set backend of prefect to server | |
prefect backend server | |
echo "[server]" >> ~/.prefect/backend.toml | |
echo "endpoint = \"http://18.246.70.121:4200\"" >> ~/.prefect/backend.toml | |
echo "[server]" >> ~/.prefect/config.toml | |
echo "[server_ui]" >> ~/.prefect/config.toml | |
echo "endpoint = \"http://18.246.70.121:4200\"" >> ~/.prefect/config.toml | |
# Run flow | |
prefect register -p .ci/register-flow.py --project ${{ env.PREFECT_PROJECT }} |