-
-
Save KyMidd/a6343152294e4ee20262afea72c94708 to your computer and use it in GitHub Desktop.
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: Test passing matrix | |
| on: | |
| - workflow_dispatch | |
| jobs: | |
| set-environment: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| ENVIRONMENT: ${{ steps.set-environment-task.outputs.ENVIRONMENT }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Define deploy locations | |
| id: set-environment-task | |
| run: | | |
| env1="'env1'" | |
| env2="'env2'" | |
| env3="'env3'" | |
| echo "ENVIRONMENT=[$env1, $env2, $env3]" >> $GITHUB_OUTPUT | |
| batch-deploy: | |
| needs: set-environment | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| environment: ${{ fromJSON(needs.set-environment.outputs.ENVIRONMENT) }} | |
| steps: | |
| - name: Deploy to environment | |
| run: echo "hi mom" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment