Build and Deploy API to Review #88
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 Deploy API to Review | |
on: | |
workflow_dispatch: | |
inputs: | |
commit: | |
description: "Leave blank to use current HEAD, or provide an override commit SHA" | |
type: string | |
required: false | |
push: | |
branches: [main] | |
jobs: | |
ref: | |
name: Load Commit Ref | |
runs-on: ubuntu-latest | |
steps: | |
- id: ref | |
uses: passportxyz/gh-workflows/.github/actions/load_commit_ref@v1 | |
with: | |
commit: ${{ inputs.commit }} | |
outputs: | |
version_tag: ${{ steps.ref.outputs.version_tag }} | |
docker_tag: ${{ steps.ref.outputs.docker_tag }} | |
refspec: ${{ steps.ref.outputs.refspec }} | |
test: | |
name: Test | |
needs: [ref] | |
uses: ./.github/workflows/test_generic.yml | |
with: | |
refspec: ${{ needs.ref.outputs.refspec }} | |
environment: review | |
uptime-robot-monitor-dry-run: --dry-run | |
secrets: inherit | |
deploy: | |
name: Deploy | |
needs: [test, ref] | |
uses: ./.github/workflows/build_and_deploy_generic.yml | |
with: | |
refspec: ${{ needs.ref.outputs.refspec }} | |
docker_tag: ${{ needs.ref.outputs.docker_tag }} | |
environment: review | |
secrets: inherit |