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"