summaryrefslogtreecommitdiffstats
path: root/pkg/runner/testdata/workdir/push.yml
blob: b76a9513166047b1be69a322d2a61f50fbc3b980 (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
30
31
32
33
34
on: push

defaults:
  run:
    working-directory: /tmp

jobs:
  workdir:
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: /root
    steps:
      - run: '[[ "$(pwd)" == "/root" ]]'

      - run: mkdir -p "${GITHUB_WORKSPACE}/workdir"

      - run: '[[ "$(pwd)" == "${GITHUB_WORKSPACE}/workdir" ]]'
        working-directory: workdir

  top-level-workdir:
    runs-on: ubuntu-latest
    steps:
      - run: '[[ "$(pwd)" == "/tmp" ]]'

  workdir-from-matrix:
    runs-on: ubuntu-latest
    strategy:
      max-parallel: 1
      matrix:
        work_dir: ["/tmp", "/root"]
    steps:
      - run: '[[ "$(pwd)" == "${{ matrix.work_dir }}" ]]'
        working-directory: ${{ matrix.work_dir }}