我正在做一个项目。我需要创建一个工作流程来在 iOS 设备上运行集成测试。
场景: 我必须在某个端口运行本地服务器,同时我还运行集成测试。
询问:
我将感谢您的帮助。
continuous-integration github-actions github-actions-runners
我不太明白 Github actions/cache 的工作范围,我的意思是:
如果我发出拉取请求,然后在同一个拉取请求中添加 1 个提交,则缓存工作正常,但如果我在同一分支中创建新的拉取请求 - 缓存将重置并再次启动,但为什么呢?
有没有办法将文件缓存扩展到所有yml
文件,以便每个拉取请求都使用现有的缓存?
因为事实证明,为了加快工作速度,开发人员总是需要将他们的工作投入到一个分支中,这在某种程度上听起来像是无稽之谈。
我的缓存密钥的形成如下
- uses: actions/cache@v2
id: composer-cache
with:
path: .github/docker/development/php-cli/composer/cache
key: ${{ runner.os }}-develop-composer-${{ hashFiles('src/composer.lock') }}
restore-keys: |
${{ runner.os }}-develop-composer-
Run Code Online (Sandbox Code Playgroud) 我想在工作流程中创建一个虚拟机并设置为自托管运行程序。目前,阻碍我的是缺乏为我提供 Runner Token 的 API。如果存在,我可以创建该实例并将其注册为运行程序,以便能够在下一个作业中使用它。
现在有人有办法获得跑步者令牌吗?
如何在 Github Actions 中指定架构(类似x86
或arm64
)?
对于那些熟悉 Github Actions 的人...
目前,当作业运行时,它会根据标签和存储库为作业选择最合适的运行器(在工作流中使用自托管运行器 - GitHub 文档)。我的问题是是否有可能在每个满足工作要求的跑步者上运行一个工作。
例如,我有多个跑步者,既有自托管的,也有由 Github 托管的;我有一个包含脚本的作业,当代码被推送到 repo 时,它会执行以下操作:
这个“动作”需要在动作可以访问的每个跑步者身上发生。
我希望这是有道理的!
github-actions github-actions-runners github-actions-self-hosted-runners
当我尝试运行 github 操作(它将构建 android apk)时,它显示错误
\n\n\n您已使用 100% 包含的 GitHub 存储服务(GitHub\n操作和包)。在设置每月支出限额之前,GitHub Actions 和 Packages\xe2\x80\x99 无法工作。
\n
\n因此,我删除了所有工件文件,但在删除每个工件后,操作存储并没有减少,
例如,我删除了 20 个工件文件,每个文件包含 20mb。这意味着 400Mb,当我检查“操作存储”时,它仍然显示已溢出
为什么会发生这种情况?
github github-actions building-github-actions github-actions-runners
我正在尝试使用自托管的 Windows-VM 来运行 west 进行存储库管理,使用 python 来运行一些脚本,并使用 git 来推送回存储库。
这项工作是使用 python 生成文件repo-A
作为工件来签入repo-B
。我必须使用 Windows,因为文件生成工具只能在 Windows 上运行。
我有一个自托管构建代理设置,并且能够在其上运行 github 操作。
在VM端,这些是相关命令的路径(表明它们已正确添加到$PATH)
PS C:\TouchGFXProjects\wallSwitch-gui-hesPrototype-480-272> gcm west; gcm tgfx.exe; gcm python; gcm git
CommandType Name Version Source
----------- ---- ------- ------
Application west.exe 0.0.0.0 C:\Users\tgfx\AppData\Local\Programs\Python\Python39\Scripts\west.exe
Application tgfx.exe 4.16.1.0 C:\TouchGFX\4.16.1\designer\tgfx.exe
Application python.exe 3.9.515... C:\Users\tgfx\AppData\Local\Programs\Python\Python39\python.exe
Application git.exe 2.31.1.1 C:\Program Files\Git\cmd\git.exe
Run Code Online (Sandbox Code Playgroud)
VM 的执行策略设置为:
PS C:\Windows\system32> Get-ExecutionPolicy -List
Scope ExecutionPolicy
----- ---------------
MachinePolicy Undefined
UserPolicy Undefined
Process Undefined
CurrentUser Undefined
LocalMachine Bypass
Run Code Online (Sandbox Code Playgroud)
当从虚拟机本身的 powerShell …
github-for-windows github-actions-runners github-actions-self-hosted-runners
我正在尝试自动部署项目,并且 npm 命令完美运行,但是当它进入 pm2 重新启动特定项目的行时,操作会失败。
GitHub 操作错误:
GitHub Action .yml 文件内容:
我是 github 动作跑步者的新手。我从 master 创建了一个 test-master 分支,另一个功能分支也从 master test-feature 中取出。我的 test-master 分支有一个与 terraform 相关的工作流程。但是,我在 git checkout 操作 PFB 代码和错误中遇到错误。
name: 'Terraform'
on: [pull_request]
jobs:
terraform:
name: 'Terraform'
runs-on: ubuntu-latest
# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
defaults:
run:
shell: bash
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@test-master
# Install the latest version of Terraform CLI and configure the Terraform CLI configuration file with …
Run Code Online (Sandbox Code Playgroud) 我有一个 bookdown 文档,它在我的本地机器上呈现得很好,但是当我使用 GitHub Actions 作为自动化进程运行时,来自各个代码块的输出显示全部混乱:
这是本书的 GitHub 存储库:https : //github.com/ries9112/cryptocurrencyresearch-org
这里是通过 GitHub Actions 自动运行的地方:https : //github.com/ries9112/cryptocurrencyresearch-org/actions
为了帮助解决问题,我创建了一个单独的存储库作为一个更加准系统的示例,并且我遇到了完全相同的问题。这是更简单示例的存储库:https : //github.com/ries9112/bookdown-test
我部署了那个更简单的测试的结果,你可以在这里找到它们:https : //brave-leakey-37b898.netlify.app/intro.html#here-adding-new-test
文档格式在本地完全没问题,所以看起来我可能需要安装其他东西,但我目前正在安装 pandoc 和 tinytex,我不知道还有什么可能会丢失。这是定义 GitHub 操作的 YAML 文件:
jobs:
build:
runs-on: macOS-10.15
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v1
- name: Install pandoc and pandoc citeproc
run: |
brew install pandoc
brew install pandoc-citeproc
- name: Install Packages
run: |-
Rscript -e "install.packages(c('pins','bookdown','tidyverse','DT'))"
- name: Refresh book
run: |-
Rscript -e "bookdown::render_book('index.Rmd', 'bookdown::gitbook')" …
Run Code Online (Sandbox Code Playgroud) 我们的团队(本质上)有一个内置于 github actions 中的 CI 系统,它为 PR 生成了 5 个测试作业。这需要 macOS github 托管的操作运行器。当构建多个 PR 时,我们的作业通常会排队,并显示以下消息:
The agent pool assigned to this job has hit their MacOs concurrency limits
Run Code Online (Sandbox Code Playgroud)
由于 github 托管的动作运行器是按需运行的,因此这个限制令人惊讶。它是什么,可以修复吗?
github ×5
github-actions-self-hosted-runners ×2
aws-cloud9 ×1
bookdown ×1
jenkins ×1
pm2 ×1
r ×1
r-markdown ×1
terraform ×1