summaryrefslogtreecommitdiffstats
path: root/pkg/runner/testdata/defaults-run/main.yaml
blob: 0b1fa0ab5a15df6098e93e7878d8ece5d4b641aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: defaults-run
on:
  - push
defaults:
  run:
    shell: sh
jobs:
  without-defaults:
    runs-on: ubuntu-latest
    steps:
    - run: echo $SHELL | grep -v bash || exit 1
  with-defaults:
    runs-on: ubuntu-latest
    defaults:
      run:
        shell: bash
        working-directory: /tmp
    steps:
    - run: |
        echo $SHELL | grep bash || exit 1
        [ $(pwd) = /tmp ] || exit 2
  override-in-step:
    runs-on: ubuntu-latest
    defaults:
      run:
        shell: bash
    steps:
    - run: echo $SHELL | grep -v bash || exit 1
      shell: sh