Loading...
Loading...
Set up a repository for local GitHub Actions verification using act, so Jules can validate CI before pushing
npx skill4agent add google-labs-code/jules-skills local-action-verificationactactscripts/scripts/act/Target structure:
scripts/act/
├── install-act.sh
└── run-act.shchmod +x scripts/act/install-act.sh scripts/act/run-act.shAGENTS.md## Local CI Verification
Before pushing code or opening a PR, verify changes pass CI locally using `act`.
### Prerequisites
- Docker must be running
- If `act` is not installed, run: `bash scripts/act/install-act.sh`
### How to Verify
1. Read `.github/workflows/` to find the CI workflow and identify the job ID
2. Run the verification script:
```bash
bash scripts/act/run-act.sh "push -j <JOB_ID>"bash scripts/act/run-act.sh "push -j <JOB_ID> --matrix <KEY>:<VALUE>"rm -f act_output.log
git checkout <any unintended file changes>ACT_TIMEOUT=900 bash scripts/act/run-act.sh "..."ACT_POLL=15 bash scripts/act/run-act.sh "..."-P ubuntu-latest=node:20-bookworm
### Step 3: Update .gitignore
Append these entries to `.gitignore` if they don't already exist:
### Step 4: Print next steps for the user
Tell the user:
1. Docker must be installed and running on any machine (or Jules VM) where verification runs
2. `act` will be auto-installed on first use via `scripts/act/install-act.sh`
3. If workflows require secrets, create a `.secrets` file (KEY=VALUE format) — never commit it
4. Commit all generated files
## Troubleshooting
- **Docker not running**: `act` requires Docker. Ensure the Docker daemon is started.
- **Image pull slow**: First run downloads ~2GB+. Use `-P ubuntu-latest=node:20-bookworm` for faster pulls.
- **ARM64 issues**: On Apple Silicon, add `--container-architecture linux/amd64` to act arguments.
- **Secrets required**: Create a `.secrets` file and pass `--secret-file .secrets` in the act arguments.
- **Timeout**: Increase with `ACT_TIMEOUT=1200 bash scripts/act/run-act.sh "..."`.
## Resource References
- [Troubleshooting Guide](resources/troubleshooting.md) — Detailed solutions for common issues