Unverified Commit 33741bd2 authored by daz's avatar daz
Browse files

Make it easier to run workflows locally with 'act'

parent ea328a86
Loading
Loading
Loading
Loading
+1
Changes for .github/actions/init-integ-test/action.yml: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ runs:

    # Downloads a 'dist' directory artifact that was uploaded in an earlier 'build-dist' step
    - name: Download dist
      if: ${{ !env.ACT }}
      uses: actions/download-artifact@v4
      with:
        name: dist
+17 −4
Changes for build: 17 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -3,8 +3,21 @@
cd sources
npm install

if [ "$1" == "all" ]; then
    npm run all
else
case "$1" in
    all)
        nprm run all
        ;;
    act)
        # Build and copy outputs to the dist directory
        npm run build
fi
        cd ..
        cp -r sources/dist .
        # Run act
        $@
        # Revert the changes to the dist directory
        git co -- dist
        ;;
    *)
        npm run build
        ;;
esac
 No newline at end of file