alwqx / blog

my personal blog repo
https://alwq.xyz
0 stars 0 forks source link

使用 act 本地运行 github actions #50

Closed alwqx closed 2 months ago

alwqx commented 3 months ago

act 简介

act 安装

ollama 使用 act

关键: 通读 act 文档usage

.actrc 内容

-P ubuntu-latest=adolphlwq/act-runner-ubuntu:22.04
-P macos-latest=-self-hosted
-P windows-2019=dockurr/windows:2019
--artifact-server-path /tmp/artifacts

执行 pr 触发的 actions

act pull_request

相关问题

  1. upload-artifacts 报错 参考 https://github.com/nektos/act/issues/329#issuecomment-1187246629
If you are using nektos/act with actions/upload-artifact and actions/download-artifact, artifact server is already implemented in act (though it's not mentioned in this issue how to run it).

Just use --artifact-server-path option.

It is used like this: --artifact-server-path /tmp/artifacts (don't forget to mkdir /tmp/artifacts).

参考

alwqx commented 3 months ago

问题

windows 镜像

https://hub.docker.com/_/microsoft-windows-server

https://learn.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/container-base-images

Windows container version compatibility

New Windows Server 2019 Container Images

alwqx commented 3 months ago

.actrc

-P ubuntu-latest=adolphlwq/act-runner-ubuntu:22.04
-P macos-latest=-self-hosted
-P windows-2019=dockurr/windows:2019
--artifact-server-path /tmp/artifacts