Skip to content

Build and Deploy API to Review #5

Build and Deploy API to Review

Build and Deploy API to Review #5

name: Build and Deploy to Review
on:
workflow_dispatch:
inputs:
commit:
description: "Leave blank to use current HEAD, or provide an override commit SHA"
type: string
required: false
jobs:
ref:
name: Load Commit Ref
runs-on: ubuntu-latest
steps:
- id: ref
uses: passportxyz/gh-workflows/.github/actions/load_commit_ref@main
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: Run Tests
needs: [ref]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ needs.ref.outputs.refspec }}
fetch-depth: 0
- id: test
uses: ./.github/actions/test.yml
deploy:
name: Deploy
needs: [test]
uses: ./.github/workflows/build_and_deploy_generic.yml
with:
commit: ${{ inputs.commit }}
environment: review
secrets: inherit