From 36b7c6cb105264385f574c0d7df7da7bebaedcf0 Mon Sep 17 00:00:00 2001 From: Lauro Fialho Mueller Date: Fri, 3 Nov 2023 15:30:52 +0100 Subject: [PATCH] feat(07-expressions): add workflow --- .github/workflows/07-expressions.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/07-expressions.yaml diff --git a/.github/workflows/07-expressions.yaml b/.github/workflows/07-expressions.yaml new file mode 100644 index 0000000..ecd9256 --- /dev/null +++ b/.github/workflows/07-expressions.yaml @@ -0,0 +1,26 @@ +name: 07 - Using Expressions + +on: + push: + workflow_dispatch: + inputs: + debug: + type: boolean + default: false + +jobs: + echo: + runs-on: ubuntu-latest + steps: + - name: '[debug] Print start-up data' + if: ${{ inputs.debug }} + run: | + echo "Triggered by: ${{ github.event_name }}" + echo "Branch: ${{ github.ref }}" + echo "Commit SHA: ${{ github.sha }}" + echo "Runner OS: ${{ runner.os }}" + - name: '[debug] Print when triggered from main' + if: ${{ inputs.debug && github.ref == 'refs/heads/main' }} + run: echo "I was triggered from main" + - name: Greeting + run: echo "Hello, world"