mirror of
https://github.com/gradle/actions.git
synced 2025-04-19 17:29:20 +08:00
Make it easier to run workflows locally with 'act'
This commit is contained in:
parent
ea328a863d
commit
33741bd2bb
1
.github/actions/init-integ-test/action.yml
vendored
1
.github/actions/init-integ-test/action.yml
vendored
@ -11,6 +11,7 @@ runs:
|
|||||||
|
|
||||||
# Downloads a 'dist' directory artifact that was uploaded in an earlier 'build-dist' step
|
# Downloads a 'dist' directory artifact that was uploaded in an earlier 'build-dist' step
|
||||||
- name: Download dist
|
- name: Download dist
|
||||||
|
if: ${{ !env.ACT }}
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: dist
|
name: dist
|
||||||
|
23
build
23
build
@ -3,8 +3,21 @@
|
|||||||
cd sources
|
cd sources
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
if [ "$1" == "all" ]; then
|
case "$1" in
|
||||||
npm run all
|
all)
|
||||||
else
|
nprm run all
|
||||||
npm run build
|
;;
|
||||||
fi
|
act)
|
||||||
|
# Build and copy outputs to the dist directory
|
||||||
|
npm run build
|
||||||
|
cd ..
|
||||||
|
cp -r sources/dist .
|
||||||
|
# Run act
|
||||||
|
$@
|
||||||
|
# Revert the changes to the dist directory
|
||||||
|
git co -- dist
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
npm run build
|
||||||
|
;;
|
||||||
|
esac
|
Loading…
x
Reference in New Issue
Block a user