mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-08-08 01:45:03 +02:00
Support setting shell via defaults.run (#343)
Note that we don't support the more general use of defaults, just its run key for setting shell and working directory. The documentation for defaults.run is here: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#defaultsrun Fixes #214. Co-authored-by: Casey Lee <[email protected]>
This commit is contained in:
co-authored by
Casey Lee
parent
b3b8961122
commit
e698e8b324
+29
@@ -0,0 +1,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
|
||||
Reference in New Issue
Block a user