-
Notifications
You must be signed in to change notification settings - Fork 190
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Running into an issue where I'd like to excldue a matrix entry via an expression, but it flags that the return value isn't one of the matrix combos:
value "${{ (github.event_name == 'release' && 'prod') || 'dev' }}" in "exclude" does not match in matrix "envs" combinations. possible values are "dev", "staging", "prod"
Here is an example file:
name: Test Matrix
run-name: Deploy ${{ github.ref_name }}
on: [push]
jobs:
deploy-infra:
name: Deploy Infrastructure
runs-on: ubuntu-latest
strategy:
matrix:
directory: ["database", "service"]
envs: ['dev', 'staging', 'prod']
exclude:
- envs: ${{ (github.event_name == 'release' && 'prod') || 'dev' }}
steps:
- name: Show matrix
run: |
echo ${{ matrix.directory }} ${{ matrix.envs }}
Any assistance or pointers appreciated.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working