win_64

峨眉山市雅铭网络工作室 2022-04-03
预计阅读时间 1 分钟
144

Create a folder under the drive root

$ mkdir actions-runner; cd actions-runner# Download the latest runner package
$ Invoke-WebRequest -Uri https://github.com/actions/runner/releases/download/v2.285.1/actions-runner-win-x64-2.285.1.zip -OutFile actions-runner-win-x64-2.285.1.zip# Optional: Validate the hash
$ if((Get-FileHash -Path actions-runner-win-x64-2.285.1.zip -Algorithm SHA256).Hash.ToUpper() -ne ‘f79dbb6dfae9d42d0befb8cff30a145dd32c9b1df6ff280c9935c46884b001f3’.ToUpper()){ throw ‘Computed checksum did not match’ }# Extract the installer
$ Add-Type -AssemblyName System.IO.Compression.FileSystem ; [System.IO.Compression.ZipFile]::ExtractToDirectory(“$PWD/actions-runner-win-x64-2.285.1.zip”, “$PWD”)

配置

Create the runner and start the configuration experience

$ ./config.cmd --url 自己仓库 --token 自己密钥# Run it!
$ ./run.cmd

使用

Use this YAML in your workflow file for each job

runs-on: self-hosted


如果此文章对您有帮助欢迎点赞收藏。