manually deploy to stage #6
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: manually deploy to stage | |
on: | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: 'Define env name' | |
required: true | |
type: choice | |
options: | |
- prod | |
- my test | |
default: 'prod' | |
branch: | |
description: 'Define branch name' | |
required: true | |
default: 'main' | |
env: | |
TASK: ${{ github.event.inputs.environment }} | |
permissions: write-all | |
jobs: | |
hello: | |
runs-on: ubuntu-latest | |
steps: | |
- name: hi there | |
run: echo hi there $USER $TASK | |
- name: env there | |
run: env | |
deploy: | |
runs-on: ubuntu-latest | |
env: | |
USER: me | |
TASK: say hello | |
needs: hello | |
steps: | |
- name: goodbye | |
run: echo goodbye $USER $TASK | |
- name: env there | |
run: env |