我正在尝试use_github_action_check_standard()从usethisR 包运行命令,以在 GitHub Actions 上的每次推送中检查我的包。
该测试在 Windows 和 MacOS 上运行没有问题,但对于这两个 Linux 版本,我的工作流程代码甚至在到达包代码之前就失败了。
\n当它尝试安装系统依赖项时失败,它给了我错误##[error]Process completed with exit code 1。
当我查看原始日志(如下)时,我注意到这一行:\n Cache not found for input keys: Linux-287c850eb370edd647ed85b6fac18cbaee02effa7d01b981304dce84a452b22c-1-, Linux--1-.\n但是我担心我不理解该错误。另外,我不认为是这样,因为密钥已经出现在上面的组中(注意 ),##[endgroup]但错误仅出现在下一组中(如屏幕截图所示)。
有任何想法吗?非常感谢!
\n我还在下面发布了我的整个工作流程代码。
\n2020-08-12T22:21:55.5243116Z ##[group]Run install.packages(\'remotes\')\n2020-08-12T22:21:55.5243360Z [36;1minstall.packages(\'remotes\')[0m\n2020-08-12T22:21:55.5243487Z [36;1msaveRDS(remotes::dev_package_deps(dependencies = TRUE), "../.github/depends.Rds", version = 2)[0m\n2020-08-12T22:21:55.5243834Z [36;1mwriteLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), "../.github/R-version")[0m\n2020-08-12T22:21:55.5250702Z shell: /usr/local/bin/Rscript {0}\n2020-08-12T22:21:55.5251247Z env:\n2020-08-12T22:21:55.5251370Z R_REMOTES_NO_ERRORS_FROM_WARNINGS: true\n2020-08-12T22:21:55.5251571Z RSPM: https://packagemanager.rstudio.com/cran/__linux__/focal/latest\n2020-08-12T22:21:55.5251726Z R_LIBS_USER: /home/runner/work/_temp/Library\n2020-08-12T22:21:55.5251838Z TZ: UTC\n2020-08-12T22:21:55.5251944Z NOT_CRAN: …Run Code Online (Sandbox Code Playgroud) 使用 GitHub Actions,在使用 Rust 的cargo.
我怀疑我忘记了以下代码中的某些内容,这里可能有什么问题?
编辑:如果您想查看的话,这是日志!
name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Cargo Cache
uses: actions/cache@v1
with:
path: ~/.cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
${{ runner.os }}-cargo
- name: Cargo Target Cache
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.toml') }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os …Run Code Online (Sandbox Code Playgroud) 因此,我尝试在 yml 文件上为生成的工件实现发布部分,并解释自己:我想使用 yml 文件将工件添加到我的版本中。
这是我正在为 Android 应用程序处理的唯一 yml 文件:
name: Android CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: mkdir -p app/build/outputs/apk/release
- run: echo hello > app/build/outputs/apk/release/app-release-unsigned.apk
- uses: actions/upload-artifact@v2
with:
name: my-artifact
path: app/build/outputs/apk/release/app-release-unsigned.apk
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Permition Gradlew
run: chmod +x gradlew
- name: Build Gradlew
run: ./gradlew assembleRelease
Run Code Online (Sandbox Code Playgroud) continuous-integration android github github-release github-actions
我不知道如何在 Github Actions 中运行缓存的 Docker 映像。
我按照有关发布 Docker 映像的教程来实现缓存、构建 Docker 映像并将其推送到 DockerHub 的任务。
我需要构建、缓存和运行图像,图像发布是可选的。
我的目标是加快 CI 工作流程。
以下是 Github Actions 工作流程:
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of …Run Code Online (Sandbox Code Playgroud) GitHub Action“dotnet-tests-report”将包含测试结果的 Markdown 页面附加到 Github Action 工作流程运行摘要。这真的很好。工作流程完成后,结果会立即变得清晰。以视觉方式清晰。
它是开源的,但代码很复杂,所以我仍然不知道如何做到这一点。
我想要的是这样的:
我读过一些类似的帖子,但似乎没有人回答这个问题。如果我知道秘密的名称,我可以将单个 GitHub 秘密设置到环境变量中: env: PW_ID0007: "${{secrets.PW_ID0007}}" 如何在不知道秘密名称的情况下将所有秘密公开为环境变量(或者批量或以某种方式迭代它们并单独设置它们?)
我有一个 GitHub 工作流程,其中包含长时间运行的作业(10 小时)。即使我在作业中配置了超时分钟数,它也会在 6 小时内被取消。有限制吗?
name: Spawn cluster
on:
workflow_dispatch:
schedule:
- cron: '0 */12 * * *'
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 600
steps:
- name: CHECKOUT
uses: actions/checkout@v2
- name: AZURE LOGIN
uses: azure/login@v1
with:
creds: ${{secrets.AZURE_CREDENTIALS}}
Run Code Online (Sandbox Code Playgroud) 我想通过两种方式运行我的 Github 工作流程:
现在,一切都运行良好,直到我添加输入参数。之后,cron 作业正在运行,但不选择默认值。
这是我的 yaml:
name: WebDriverIO Automation
on:
workflow_dispatch:
inputs:
typeOfTesting:
type: choice
description: Select Type of Test
default: 'stage-test-local-All'
required: true
options:
- stage-test-local-All
- stage-test
- stage-test-local-Sanity
- prod-test
branches:
- workingBranch
- JSNew
schedule:
- cron: "*/5 * * * *"
Run Code Online (Sandbox Code Playgroud) 我正在尝试从另一个工作流程调用可重用工作流程,并向其传递一些输入变量。在调用者工作流程中,我有一些环境变量,我想将它们作为输入传递给可重用的工作流程,如下所示:
env:
SOME_VAR: bla_bla_bla
ANOTHER_VAR: stuff_stuff
jobs:
print:
runs-on: ubuntu-latest
steps:
- name: Print inputs passed to the reusable workflow
run: |
echo "some var: $SOME_VAR"
echo "another var: $ANOTHER_VAR"
call_reusable:
uses: ...
with:
input_var: $SOME_VAR
another_input_var: $ANOTHER_VAR
Run Code Online (Sandbox Code Playgroud)
可重用的工作流程:
on:
workflow_dispatch:
workflow_call:
inputs:
input_var:
required: true
type: string
another_input_var:
required: true
type: string
jobs:
the_job:
runs-on: ubuntu-latest
steps:
- name: Print inputs
run: |
echo "input_var: ${{ inputs.input_var }}"
echo "another_input_var: ${{ inputs.another_input_var }}"
Run Code Online (Sandbox Code Playgroud)
该Print inputs passed to the …
当我尝试使用 GitHub 操作在 firebase 上部署 nextjs 项目时,收到一条错误消息
Error: Cannot deploy a web framework to hosting because the experiment webframeworks is not enabled. To enable webframeworks run firebase experiments:enable webframeworks
Run Code Online (Sandbox Code Playgroud)
我试过
firebase experiments:enable webframeworks
Run Code Online (Sandbox Code Playgroud)
从我的电脑上,但它仍然无法正常工作。
以下是 GitHub 操作的 yaml 文件。
name: Deploy to Firebase Hosting on merge
'on':
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT }}'
channelId: …Run Code Online (Sandbox Code Playgroud)