小编Kal*_*rin的帖子

如何在可重用的 github 工作流程中执行远程脚本

我在一个名为的存储库中有这个工作流程terraform-do-database,我正在尝试使用来自公共存储库的可重用工作流程foo/git-workflows/.github/workflows/tag_validation.yaml@master

name: Tag Validation

on:
  pull_request:
    branches: [master]
  push:
    branches:    
      - '*'         # matches every branch that doesn't contain a '/'
      - '*/*'       # matches every branch containing a single '/'
      - '**'        # matches every branch
      - '!master'   # excludes master
  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

jobs:

  tag_check:
    uses: foo/git-workflows/.github/workflows/tag_validation.yaml@master
Run Code Online (Sandbox Code Playgroud)

这是来自公共存储库的可重用工作流程文件git-workflows,其中包含应在其上运行的脚本。发生的情况是工作流程正在尝试使用存储库内的脚本terraform-do-database

name: Tag Validation

on:
  pull_request:
    branches: [master]
  workflow_call:

jobs:

  tag_check:
    # The type of …
Run Code Online (Sandbox Code Playgroud)

workflow github github-actions

7
推荐指数
2
解决办法
6073
查看次数

Github Action错误每一步都必须定义`uses`或`run`键

我无法使这个工作流程正常工作,我总是收到此错误every step must define a "uses" or "run" key,但是查看我的脚本,我没有看到任何问题,有人可以帮我解决这个问题吗?这看起来不像-平常那​​样是一个问题。

# This is a basic workflow to help you get started with Actions

name: Build Digital Ocean Image

# Controls when the workflow 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 …
Run Code Online (Sandbox Code Playgroud)

github github-actions

5
推荐指数
1
解决办法
1万
查看次数

如何对 Grafana-Loki 日志中的某些值求和?

我有这个日志行:

Successfully encrypted 189322 bytes for upload req_id=MediaUpload
Successfully encrypted 189322 bytes for upload req_id=MediaUpload
Successfully encrypted 492346 bytes for upload req_id=MediaUpload
Run Code Online (Sandbox Code Playgroud)

有没有办法对匹配的查询日志行的字节进行求和?例如,通过这些日志,我希望获得870990字节或0.87099MB 的总和值。

那可能吗?

grafana-loki

3
推荐指数
1
解决办法
4471
查看次数

标签 统计

github ×2

github-actions ×2

grafana-loki ×1

workflow ×1