dev release #1
This file contains hidden or 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: dev release | |
| on: | |
| workflow_run: | |
| workflows: ["Pipeline Unit Tests"] | |
| types: | |
| - completed | |
| branches: | |
| - dev | |
| permissions: | |
| id-token: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.event.workflow_run.head_branch }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Build package | |
| run: | | |
| cd loading_pipeline | |
| rm -rf dist/ | |
| python -m pip install build | |
| python -m build | |
| - name: authenticate to google cloud | |
| id: "auth" | |
| uses: google-github-actions/auth@v0 | |
| with: | |
| workload_identity_provider: "${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}" | |
| service_account: "${{ secrets.RUN_SA_EMAIL }}" | |
| - name: "setup gcloud sdk" | |
| uses: google-github-actions/setup-gcloud@v0 | |
| - name: Copy files to release directory | |
| run: |- | |
| gcloud storage rm -r gs://seqr-pipeline-runner-builds/dev/latest/ || echo 'No latest release' | |
| gcloud storage cp loading_pipeline/bin/* gs://seqr-pipeline-runner-builds/dev/latest/bin/ | |
| gcloud storage cp cd loading_pipeline/dist/*.whl gs://seqr-pipeline-runner-builds/dev/latest/pyscripts.zip | |
| gcloud storage cp loading_pipeline/bin/* gs://seqr-pipeline-runner-builds/dev/${{ github.event.workflow_run.head_sha }}/bin/ | |
| gcloud storage cp cd loading_pipeline/dist/*.whl gs://seqr-pipeline-runner-builds/dev/${{ github.event.workflow_run.head_sha }}/pyscripts.zip | |
| docker: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| ref: ${{ github.event.workflow_run.head_branch }} | |
| - name: authenticate to google cloud | |
| id: "auth" | |
| uses: google-github-actions/auth@v3 | |
| with: | |
| workload_identity_provider: "${{ secrets.WORKLOAD_IDENTITY_PROVIDER }}" | |
| service_account: "${{ secrets.RUN_SA_EMAIL }}" | |
| - name: "setup gcloud sdk" | |
| uses: google-github-actions/setup-gcloud@v2 | |
| - name: Build and push images | |
| run: |- | |
| gcloud builds submit --quiet --substitutions="COMMIT_SHA=${{ github.event.workflow_run.head_sha }},_CUSTOM_BRANCH_TAG=dev" --config .cloudbuild/pipeline-docker.cloudbuild.yaml --gcs-log-dir=gs://seqr-github-actions-logs/logs . | |