Factor out deploy
and cleanup-terraform
into reusable workflows
#5
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: build-and-run-model | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
branches: [master] | |
jobs: | |
build-and-run-model: | |
permissions: | |
# contents:read and id-token:write permissions are needed to interact | |
# with GitHub's OIDC Token endpoint so that we can authenticate with AWS | |
contents: read | |
id-token: write | |
# While packages:write is usually not required for workflows, it is | |
# required in order to allow the reusable called workflow to push to | |
# GitHub Container Registry | |
packages: write | |
uses: ./.github/workflows/deploy.yaml | |
with: | |
role-duration-seconds: 14400 # Worst-case time for a full model run | |
secrets: | |
AWS_IAM_ROLE_TO_ASSUME_ARN: ${{ secrets.AWS_IAM_ROLE_TO_ASSUME_ARN }} | |
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }} |