在推送事件中,是否可以获得 PR 标题,以便我可以使用相同的内容来创建版本和标签。
目前,我无法在推送事件中获得 PR 头衔。
任何人都可以帮忙吗?
我第一次使用 tflint 扫描我的 terraform 代码。为此,我创建了 shell 脚本来执行 tflint 命令,但是,在执行 tflint 作业时,我收到一些 [WARN] 消息。我不确定它们是如何生成的。有办法抑制吗?
tflint 命令已成功执行,并且还在我的 terraform 代码中显示可能的问题/通知。
我正在使用下面的 Github 工作流程操作;
- name: Setup TFLint
uses: terraform-linters/setup-tflint@v1
with:
tflint_version: v0.26.0
- name: Lint Terraform Code
run: scripts/tflint.sh
shell: bash
continue-on-error: false
Run Code Online (Sandbox Code Playgroud)
“.tflint.hcl”文件 ->
plugin "aws" {
enabled = true
version = "0.12.0"
source = "github.com/terraform-linters/tflint-ruleset-aws"
}
rule "terraform_naming_convention" {
enabled = true
}
rule "terraform_unused_declarations" {
enabled = true
}
rule "terraform_deprecated_index" {
enabled = true
}
rule "terraform_documented_outputs" {
enabled …Run Code Online (Sandbox Code Playgroud) 这里我在一个作业下有两个工作流程。我们想要实现的唯一目标是,我们希望通过缓存或其他方式重用容器镜像。我们对node_modules 的做法类似
jobs:
build:
name: build
runs-on: [self-hosted, x64, linux, research]
container:
image: <sample docker image>
env:
NPM_AUTH_TOKEN: <sample token>
steps:
- uses: actions/checkout@v2
- name: Install
run: |
npm install
- name: Build
run: |
npm build
Test:
name: Test Lint
runs-on: [self-hosted, x64, linux, research]
container:
image: <sample docker image>
env:
NPM_AUTH_TOKEN: <sample token>
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: npm ci
- name: Lint Check
run: npm run lint
Run Code Online (Sandbox Code Playgroud) 我正在尝试运行包含函数的代码srand:
srand(1);\nmy @x = (1..1000).roll(100);\nmy @y = (200..7000).roll(100);\nsay sum(@x);\nsay sum(@y);\nsay $*KERNEL\nRun Code Online (Sandbox Code Playgroud)\n从文档中可以清楚地看出,这srand是依赖于平台的的。\n当我在 Windows 10 中测试这一点时,我得到了
46221\n375477\nwin32\nRun Code Online (Sandbox Code Playgroud)\n当我在 glot.io 中测试它时,我得到
\n50941\n405340\nlinux\nRun Code Online (Sandbox Code Playgroud)\n在tio.run这里,我得到
\n47784\n354115\nlinux (5.2.11.100.fc.29.x.86._.64)\nRun Code Online (Sandbox Code Playgroud)\n\n51496\n362664\nlinux\nRun Code Online (Sandbox Code Playgroud)\n在 raku irc 频道中,其
\n\n50941\n405340\nlinux\nRun Code Online (Sandbox Code Playgroud)\n所以即使平台是linuxie $*KERNEL ~~ \'linux\',也有无数的输出。这是预期的吗?
为什么我在这里问这个问题是因为我无法在持续集成(例如github操作)中测试以下代码,因为即使在linux. 以下代码在 GitHub Actions 中失败:
use Test;\nif $*KERNEL ~~ \'win32\' {\n srand(1); …Run Code Online (Sandbox Code Playgroud) 我正在尝试在 github actions 中使用 docker 连接到 Postgres。这是我的 github 操作文件:
name: Carbon Link backend server CI
on:
push:
branches: [ 'develop', 'PC-3-setup-github-actions-on-pr-request' ]
pull_request:
branches: [ 'develop', 'PC-3-setup-github-actions-on-pr-request' ]
jobs:
# label of the container job
postgres-test:
runs-on: ubuntu-latest
container: node:latest
services:
postgres:
image: postgres:latest
# `POSTGRES_HOST` is `postgres`
env:
POSTGRES_DB: carbonlink
POSTGRES_PASSWORD: password
# optional (defaults to `5432`)
POSTGRES_PORT: 5432
# optional (defaults to `postgres`)
POSTGRES_USER: postgres
ports:
- 5432:5432
# set health checks to wait until postgres has started …Run Code Online (Sandbox Code Playgroud) (我知道这听起来可能类似于_nuxt 文件夹中缺少 js 文件,但不幸的是,我无法理解那里的答案)
当我将我的dist文件夹部署到 GitHub Pages 时,它包含
dist
| _nuxt
| css/main.css
| entry.*******.css
| entry-*******.mjs
| index-*******.mjs
| history-********.mjs
| header-********.mjs
| ... some other mjs-files
| css/main.css
| index.html
| history.html
| ... some other HTML-files
Run Code Online (Sandbox Code Playgroud)
HTML 页面已提供,非常好,并且在<head>- 部分中,他们想要加载模块(.mjs- 文件)。不幸的是,所有这些请求都失败并返回 404:
为什么对 -fold 的请求_nuxt失败,而/和 的/css请求却通过?
编辑:刚刚看到在 VS Code 中,该文件夹只是标记为-folder的符号链接.output/public(由 生成nuxi generate):
这可能是问题所在吗?但无论如何,它似乎包含这些文件:
编辑 II:我无法运行npm run …
我有一个想要运行的 YAML 管道,但我不知道如何告诉 GitHub 使用我的文件并阻止它创建新文件。
yaml 文件位于.github/workflows我的develop分支中。
在 GitHub 的“操作”下,如果我单击“自己设置工作流程”,则会执行以下操作:
路径是正确的,但它默认为默认master分支,单击master只会将我带到视图code。我找不到方法将其更改为develop
我相信代码的相关部分是:
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Run Code Online (Sandbox Code Playgroud)
如果我理解正确,workflow_dispatch应该允许它手动运行,但它似乎没有列出。
我确信这是 101,但我无法算出来。如果有人有任何想法,请分享,我将不胜感激。
@flaxon 向我展示了如何更改 URL 以指向正确的分支后,我仍然无法运行工作流程。即使我让 GitHub …
我有一个 GitHub Action 工作流程来创建新版本并在合并到我们的 master 分支后发布。但是,master 分支有一个保护。1 已成功测试的解决方案是创建具有管理员权限的 PAT,然后使用它来代替生成的令牌具有有限权限的 GitHub Action,取消选中分支保护规则上的“包括管理员”。我们不想取消选中分支保护规则上的“包括管理员”。请问有没有办法解决这个问题,而不需要更改我们的主分支的分支保护规则的任何内容。提前谢谢大家!!
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
- name: Changelog Actions
id: changelog
uses: TriPSs/conventional-changelog-action@v3
with:
github-token: ${{ secrets.PAT_ACCESS }}
- name: create releases
uses: actions/create-release@v1
if: ${{ steps.changelog.outputs.skipped == 'false'}}
env:
GITHUB_TOKEN: ${{ secrets.PAT_ACCESS }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}
Error message generated when run with "include administrators" branch protection rule in place
remote: error: GH006: Protected branch …Run Code Online (Sandbox Code Playgroud) 我的 Github Actions 中有以下逻辑:
但是,当我执行此操作时,我发现步骤 1 中的本地文件夹未安装到 docker 容器。
我想将本地目录作为卷安装到 docker 容器。我的 docker-compose 文件如下所示:
version: '3.9'
services:
kong-cp:
image: myImage
restart: on-failure
user: root
volumes:
- ./rsa:/tmpRun Code Online (Sandbox Code Playgroud)
我的 GitHub Actions 工作流程如下所示:
name: Test
on: workflow_dispatch
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout docker-compose-generator
uses: actions/checkout@v3
with:
repository: docker-compose-generator
token: ${{ secrets.GH_TOKEN }}
ref: test/mount
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USR }}
password: ${{ secrets.DOCKERHUB_PSW }} …Run Code Online (Sandbox Code Playgroud)出于安全原因,我们需要显式禁用 GitHub 托管的运行器,最好是整个组织。有关如何做的任何线索吗?
github-actions ×10
docker ×3
github ×3
dockerfile ×1
github-api ×1
github-pages ×1
lint ×1
mjs ×1
node.js ×1
nuxt.js ×1
nuxtjs3 ×1
postgresql ×1
raku ×1
rakudo ×1
sequelize.js ×1
terraform ×1
volumes ×1
workflow ×1