add Wang24 (#1051) #84
Workflow file for this run
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: Release & pre-release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
services: | |
covid-drdb-devdb: | |
image: postgres:latest | |
env: | |
POSTGRES_HOST_AUTH_METHOD: trust | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout payload repository | |
uses: actions/checkout@v3 | |
with: | |
path: covid-drdb-payload | |
- name: Fetch payload tags | |
run: | | |
cd covid-drdb-payload | |
git fetch --tags | |
- name: Checkout covid-drdb repository | |
uses: actions/checkout@v3 | |
with: | |
repository: hivdb/covid-drdb | |
path: covid-drdb | |
- name: Integration | |
env: | |
POSTGRES_PORT: 5432 | |
POSTGRES_HOST: localhost | |
run: | | |
set -e | |
cd covid-drdb | |
mkdir -p local/sqls | |
docker run --rm -v="$(pwd)":/covid-drdb/ -v="$(dirname $(pwd))"/covid-drdb-payload:/covid-drdb/payload hivdb/covid-drdb-builder:latest scripts/export-sqls.sh | |
psql -v ON_ERROR_STOP=1 -U postgres -h localhost -f local/sqls/01_schema.sql | |
psql -v ON_ERROR_STOP=1 -U postgres -h localhost -f local/sqls/02_data_tables.sql | |
psql -v ON_ERROR_STOP=1 -U postgres -h localhost -f local/sqls/03_derived_tables.sql | |
- name: Publish release | |
run: | | |
cd covid-drdb | |
docker run --shm-size=2048m --rm -v="$(pwd)":/covid-drdb/ -v="$(dirname $(pwd))"/covid-drdb-payload:/covid-drdb/payload -e GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} --network=${{ job.container.network }} hivdb/covid-drdb-builder:latest scripts/github-release.sh ${{ github.ref_name }} | |
- name: Sync to S3 | |
run: | | |
cd covid-drdb | |
docker run --rm -v="$(pwd)":/covid-drdb/ -v="$(dirname $(pwd))"/covid-drdb-payload:/covid-drdb/payload -e GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} -e AWS_DEFAULT_REGION=us-west-1 -e AWS_ACCESS_KEY_ID=${{ secrets.S3_ACCESS_KEY_ID }} -e AWS_SECRET_ACCESS_KEY=${{ secrets.S3_SECRET_ACCESS_KEY }} hivdb/covid-drdb-builder:latest scripts/sync-to-s3.sh ${{ github.ref_name }} |