Ad-Hoc Deploy & Run #31
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: Ad-Hoc Deploy & Run | |
on: | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: Environment | |
type: choice | |
options: | |
- dev | |
- staging | |
- prod | |
secrets: | |
AWS_ROLE_ARN: | |
description: AWS_ROLE_ARN | |
required: true | |
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 Ad-Hoc Task | |
uses: ./.github/actions/run_task | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | |
cluster: 'lamp' | |
service: lamp-ad-hoc-${{ inputs.environment }} |