Last active
March 28, 2022 14:10
-
-
Save GuillaumeFalourd/1b3755612299523e2602bdc35df7441b to your computer and use it in GitHub Desktop.
Example checking if an output contains or not a specific value
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: Conditional Workflow | |
on: | |
workflow_dispatch: | |
jobs: | |
job1: | |
runs-on: ubuntu-latest | |
steps: | |
- id: step1 | |
run: echo "::set-output name=test::hello" | |
- name: step 2 | |
if: contains(steps.step1.outputs.test, 'hello') | |
run: echo 'is executed' | |
- name: step 3 | |
if: contains(steps.step1.outputs.test, 'not_hello') | |
run: echo 'not executed' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment