mirror of
https://gitea.com/gitea/act
synced 2024-11-27 07:08:57 +00:00
adabf2a202
* fix: rework `setupShellCommand` * move all logic to separate function so we can test that later * split `step.Shell` and `step.WorkingDirectory` setup into own funcs * general cleanup of function * use `ActPath` to not collide with checked out repository * use `shellquote.Split()` instead of `strings.Fields()` for better command split * replace single string concat with `fmt` Signed-off-by: hackercat <me@hackerc.at> * lint(editorconfig): ignore *_test.go due to mixed style Signed-off-by: hackercat <me@hackerc.at>
38 lines
732 B
YAML
38 lines
732 B
YAML
on: push
|
|
env:
|
|
MY_SHELL: sh
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- shell: ${{ env.MY_SHELL }}
|
|
run: |
|
|
if [ -z ${BASH+x} ]; then
|
|
echo "I'm sh!"
|
|
else
|
|
exit 1
|
|
fi
|
|
check-container:
|
|
runs-on: ubuntu-latest
|
|
container: alpine:latest
|
|
steps:
|
|
- shell: ${{ env.MY_SHELL }}
|
|
run: |
|
|
if [ -z ${BASH+x} ]; then
|
|
echo "I'm sh!"
|
|
else
|
|
exit 1
|
|
fi
|
|
check-job-default:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
shell: ${{ env.MY_SHELL }}
|
|
steps:
|
|
- run: |
|
|
if [ -z ${BASH+x} ]; then
|
|
echo "I'm sh!"
|
|
else
|
|
exit 1
|
|
fi
|