Wener Site

act

约 1 分钟阅读
  • nektos/actGitHubnektos/actnektos/act · MIT, Golang · 本地运行 Github Action · , · 每行一个 flag · --artifact-server-path /tmp/artifacts · -s GITHUBTOKEN= · /.cache/actcache笔记:act
    • MIT, Golang
    • 本地运行 Github Action
bash
brew install act

act -l                   # list jobs & events
act workflow_dispatch -l # list jobs for event
act -j test -l           # list events for job

act                                         # 运行 push 事件关联 job
act pull_request                            # 运行 pull_request 事件关联 job
act -j lint -W .github/workflows/checks.yml # 限定运行的 job
act -n                                      # dry run
  • $PWD/.actrc, ~/.actrc
    • 每行一个 flag
  • --artifact-server-path /tmp/artifacts
  • -s GITHUB_TOKEN=
  • ~/.cache/actcache
  • -P ubuntu-latest=-self-hosted - 本地运行
    • windows-latest
    • macos-latest=-self-hosted
  • GITHUB_WORKSPACE=$HOME/.cache/act/$ID/hostexecutor
flagfor
--env-file ENVFILE
-s KEY=VALUEsecret
--secret-file ENVFILE
--input KEY=VALUE
--input-file ENVFILE
-C,--directory .工作目录
-P,--platform IMAGE
-a,--actor nektos/act
--container-daemon-socket unix:///var/run/docker.sock
yaml
# act 忽略某个 step
- name: Some step
  if: ${{ !env.ACT }}
text
# 映射 image
-P ubuntu-18.04=nektos/act-environments-ubuntu:18.04 -P ubuntu-latest=ubuntu:latest -P ubuntu-16.04=node:16-buster-slim
  • macOS orbstack unix:///Users/$USER/.orbstack/run/docker.sock
  • 会 mount 的内容
  • $DOCKER_SOCK:/var/run/docker.sock

Gitea

.actrc
-W .gitea/workflows/
-P host=-self-hosted
-P alpine=quay.io/wener/base:latest

关联信息

反向链接和本文引用的外部资料。

反向链接

  • Gitea Runner
    笔记 · act

    gitea/actrunner · 基于 act · 类似 github action · https://hub.docker.com/r/gitea/actrunner/tags · - · 参考 · 下载 https://dl.gitea.com/actrunner/

References

GitHub

1 条
最近更新commit f8c52f1Edit

On this page