Skip to content

Ad-Hoc Deploy & Run

Ad-Hoc Deploy & Run #8

name: Ad-Hoc Deploy & Run
on:
workflow_dispatch:
inputs:
environment:
description: Environment
type: choice
options:
- dev
- staging
- prod
jobs:
deploy:
uses: ./.github/workflows/deploy-base.yaml
with:
# pass the inputs from the workflow dispatch through to the deploy base. the booleans are
# converted to strings, so flip them back using fromJson function
environment: ${{ github.event.inputs.environment }}
deploy-ad-hoc: true
secrets: inherit
run_ad_hoc_task:
needs: deploy
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout Branch
uses: actions/checkout@v3
- name: Run Task Action
uses: ./.github/actions/run_task
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
environment: ${{ github.event.inputs.environment }}
task_name: 'ad-hoc'