install-act.sh
All checks were successful
/ job1 (push) Successful in 8s
/ job3 (push) Has been skipped
/ job2 (push) Successful in 8s
/ go-hashfiles (push) Successful in 25s
/ hashFiles (push) Successful in 7s

This commit is contained in:
严浩
2024-10-14 11:59:08 +08:00
parent 9f1706ab4d
commit 0395f38947
2 changed files with 37 additions and 1 deletions

View File

@ -20,4 +20,5 @@ docker run -d --name gitea-runner-cache-server \
docker logs gitea-runner-cache-server
```
[^1]: https://github.com/nektos/act/tree/master/pkg/artifactcache
[^1]: https://github.com/nektos/act/tree/master/pkg/artifactcache

35
install-act.sh Normal file
View File

@ -0,0 +1,35 @@
#!/bin/bash
# https://nektosact.com/usage/index.html
act --version
brew install act
# curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash
# ~/.actrc # https://nektosact.com/usage/index.html#configuration-file
# #############################
act --list
act --list pull_request
# Run the default (`push`) event:
act
# Run a specific event:
act pull_request
# Run a specific job:
act --job build
# === Secrets ===
act -s GITHUB_TOKEN="$(gh auth token)"
# Run a job in a specific workflow (useful if you have duplicate job names)
act -j lint -W .github/workflows/checks.yml --dryrun
# Collect artifacts to the /tmp/artifacts folder:
act --artifact-server-path /tmp/artifacts
# Enable verbose-logging (can be used with any of the above commands)
act -v
# ##########################################################
act --pull=false --container-architecture linux/amd64 -P ubuntu-latest=catthehacker/ubuntu:act-latest --secret-file my.secrets