Skip to content

Deploy build

Deploy build #15

Workflow file for this run

name: Deploy build
on:
workflow_run:
workflows: [ Tests ]
branches: main
types:
- completed
jobs:
build:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: ./.github/workflows/build.yml
secrets: inherit
permissions:
packages: write
contents: read
with:
ref_name: ${{ inputs.ref_name || github.ref_name }}
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Run deployment wf
env:
RUN_NAME: ${{ format('Deploy {0} / {1} / {2}', vars.APP_NAME, needs.build.outputs.component || '-', needs.build.outputs.image_tag) }}
uses: the-actions-org/workflow-dispatch@v4
with:
run-name: ${{ env.RUN_NAME }}
workflow: deploy-v2.yml
ref: main
repo: ${{ vars.DEPLOY_REPO }}
token: ${{ secrets.DEPLOY_REPO_TOKEN }}
inputs: |
{
"app_name": "${{ vars.APP_NAME }}",
"image_tag": "${{ needs.build.outputs.image_tag }}",
"image_digest": "${{ needs.build.outputs.image_digest }}",
"image_revision": "${{ needs.build.outputs.image_revision || github.sha }}",
"run_name": "${{ env.RUN_NAME }}"
}