Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Action workflows clean up #218

Merged
merged 4 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 32 additions & 35 deletions .github/workflows/fetch-and-ingest-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,42 @@ on:
description: 'Specific container image to use for build (will override the default of "nextstrain build")'
required: false

env:
NEXTSTRAIN_DOCKER_IMAGE: ${{ github.event.inputs.image }}

jobs:
fetch-and-ingest:
set_config_overrides:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: nextstrain/.github/actions/setup-nextstrain-cli@master
with:
cli-version: ">=7.1.0"
python-version: "3.10"

- name: install-pyyaml
run: python3 -m pip install pyyaml

- name: run_pipeline
- id: upload_config
run: |
# Create JSON string for the nested upload config
GITHUB_BRANCH=${GITHUB_REF#refs/heads/}
./phylogenetic/bin/set-branch-ingest-config \
--config-yaml ingest/config/optional.yaml \
--s3-dst s3://nextstrain-data/files/workflows/monkeypox/branch/"${GITHUB_BRANCH}" \
> ingest/config/optional-branch.yaml
S3_DST="s3://nextstrain-data/files/workflows/monkeypox/branch/${GITHUB_BRANCH}"
UPLOAD_CONFIG=$(jq -cn --arg S3_DST "$S3_DST" '{"s3": {"dst": $S3_DST }}')

nextstrain build \
--aws-batch \
--detach \
--no-download \
--cpus 32 \
--memory 64gib \
--env AWS_DEFAULT_REGION \
--env AWS_ACCESS_KEY_ID \
--env AWS_SECRET_ACCESS_KEY \
--env GITHUB_RUN_ID \
ingest \
--configfiles config/config.yaml config/optional-branch.yaml \
--config trigger_rebuild=False
env:
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GITHUB_RUN_ID: ${{ github.run_id }}
echo "upload_config=$UPLOAD_CONFIG" >> "$GITHUB_OUTPUT"
outputs:
upload_config: ${{ steps.upload_config.outputs.upload_config }}

fetch-and-ingest:
needs: [set_config_overrides]
permissions:
id-token: write
uses: nextstrain/.github/.github/workflows/pathogen-repo-build.yaml@master
secrets: inherit
with:
runtime: aws-batch
env: |
NEXTSTRAIN_DOCKER_IMAGE: ${{ inputs.image }}
UPLOAD_CONFIG: ${{ needs.set_config_overrides.outputs.upload_config }}
run: |
nextstrain build \
--aws-batch \
--detach \
--no-download \
--cpus 32 \
--memory 64gib \
--env AWS_ACCESS_KEY_ID \
--env AWS_SECRET_ACCESS_KEY \
ingest \
--configfiles config/config.yaml config/optional.yaml \
--config trigger_rebuild=False send_slack_notifications=False upload="$UPLOAD_CONFIG"
1 change: 0 additions & 1 deletion .github/workflows/fetch-and-ingest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
--no-download \
--cpus 32 \
--memory 64gib \
--env AWS_DEFAULT_REGION \
--env AWS_ACCESS_KEY_ID \
--env AWS_SECRET_ACCESS_KEY \
--env GITHUB_RUN_ID \
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/rebuild-hmpxv1-big.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jobs:
--no-download \
--cpus 8 \
--memory 68gib \
--env AWS_DEFAULT_REGION \
--env AWS_ACCESS_KEY_ID \
--env AWS_SECRET_ACCESS_KEY \
--env GITHUB_RUN_ID \
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/rebuild-hmpxv1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jobs:
--no-download \
--cpus 8 \
--memory 32gib \
--env AWS_DEFAULT_REGION \
--env AWS_ACCESS_KEY_ID \
--env AWS_SECRET_ACCESS_KEY \
--env GITHUB_RUN_ID \
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/rebuild-mpxv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jobs:
--no-download \
--cpus 8 \
--memory 32gib \
--env AWS_DEFAULT_REGION \
--env AWS_ACCESS_KEY_ID \
--env AWS_SECRET_ACCESS_KEY \
--env GITHUB_RUN_ID \
Expand Down
1 change: 0 additions & 1 deletion ingest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ The complete ingest pipeline with AWS S3 uploads and Slack notifications uses th

#### Required

- `AWS_DEFAULT_REGION`
- `AWS_ACCESS_KEY_ID`
- `AWS_SECRET_ACCESS_KEY`
- `SLACK_TOKEN`
Expand Down
29 changes: 0 additions & 29 deletions phylogenetic/bin/set-branch-ingest-config

This file was deleted.