Files
act-runner-example/install-act.sh
严浩 0a6aed2a9b
All checks were successful
/ job1 (push) Successful in 8s
/ job3 (push) Has been skipped
/ job2 (push) Successful in 6s
/ go-hashfiles (push) Successful in 22s
/ hashFiles (push) Successful in 6s
添加 act-event-file.json 文件并更新 install-act.sh 以使用事件文件
2024-10-14 12:05:08 +08:00

38 lines
1.1 KiB
Bash

#!/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
# https://nektosact.com/usage/index.html#using-event-file-to-provide-complete-event-payload
act --eventpath act-event-file.json