1
0
mirror of https://gitea.com/gitea/act synced 2024-11-27 07:08:57 +00:00
act/pkg/runner/testdata/workdir/push.yml
Kris 75ffa205c4
Make sure working directory is respected when configured from matrix (#1686)
* Make sure working directory is respected when configured from matrix

* Fix regression by setting Workingdirectory on stepRun instead of step or too early
2023-03-28 12:24:03 +00:00

35 lines
718 B
YAML

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 }}