mirror of
https://github.com/samber/awesome-prometheus-alerts.git
synced 2026-06-21 00:47:18 +08:00
fix: fix GitHub Actions workflow issues (#505)
- Replace deprecated ::set-output with $GITHUB_OUTPUT - Pin mikefarah/yq from @master to @v4 - Add explicit permissions: contents: write to publish workflow - Limit test workflow push trigger to master branch only
This commit is contained in:
parent
e2af1325c6
commit
01a5791376
2 changed files with 11 additions and 4 deletions
7
.github/workflows/dist.yml
vendored
7
.github/workflows/dist.yml
vendored
|
|
@ -6,6 +6,9 @@ on:
|
|||
branches:
|
||||
- master
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish
|
||||
|
|
@ -22,7 +25,7 @@ jobs:
|
|||
ruby-version: 3.4
|
||||
|
||||
- name: Set up yq
|
||||
uses: mikefarah/yq@master
|
||||
uses: mikefarah/yq@v4
|
||||
|
||||
- name: Install liquid
|
||||
run: |
|
||||
|
|
@ -53,7 +56,7 @@ jobs:
|
|||
# https://peterevans.dev/posts/github-actions-how-to-automate-code-formatting-in-pull-requests/
|
||||
- name: Check for modified files
|
||||
id: git-check
|
||||
run: echo ::set-output name=modified::$(git status -s --porcelain | wc -l | awk '{$1=$1};1')
|
||||
run: echo "modified=$(git status -s --porcelain | wc -l | awk '{$1=$1};1')" >> $GITHUB_OUTPUT
|
||||
- name: Push changes
|
||||
if: steps.git-check.outputs.modified != '0'
|
||||
run: |
|
||||
|
|
|
|||
8
.github/workflows/test.yml
vendored
8
.github/workflows/test.yml
vendored
|
|
@ -1,6 +1,10 @@
|
|||
name: Promtool check
|
||||
|
||||
on: [pull_request, push]
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
promtool-check:
|
||||
|
|
@ -16,7 +20,7 @@ jobs:
|
|||
ruby-version: 3.4
|
||||
|
||||
- name: Set up yq
|
||||
uses: mikefarah/yq@master
|
||||
uses: mikefarah/yq@v4
|
||||
|
||||
- name: Install liquid
|
||||
run: gem install liquid-cli
|
||||
|
|
|
|||
Loading…
Reference in a new issue