experiment with issue templates #24
This file contains hidden or 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: Deploy | |
| concurrency: deploy | |
| on: | |
| release: | |
| types: [published] | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| inputs: | |
| environment: | |
| description: | | |
| Environment to deploy. | |
| Must select the default branch for staging, and a release tag for production. | |
| type: environment | |
| required: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_CONTEXT: ${{ toJson(github) }} | |
| steps: | |
| - run: env | |
| - run: echo "$GITHUB_CONTEXT" | |
| staging: | |
| if: | | |
| github.event_name == 'push' || ( | |
| github.event_name == 'workflow_dispatch' && | |
| github.event.inputs.environment == 'staging' && | |
| github.ref_name == github.event.repository.default_branch | |
| ) | |
| runs-on: ubuntu-latest | |
| environment: staging | |
| needs: build | |
| steps: | |
| - run: echo "TODO deploy staging iff we're a push or a manual trigger on ${{ github.event.repository.default_branch }}" | |
| production: | |
| if: | | |
| github.event_name == 'release' || ( | |
| github.event_name == 'workflow_dispatch' && | |
| github.event.inputs.environment == 'production' && | |
| github.ref_type == 'tag' | |
| ) | |
| runs-on: ubuntu-latest | |
| environment: production | |
| needs: build | |
| steps: | |
| - run: echo "TODO deploy production iff we're a release or a manual trigger on a tag" |