mirror of
https://github.com/samber/awesome-prometheus-alerts.git
synced 2026-06-20 16:46:37 +08:00
fix(ci): fix Publish workflow startup_failure (#565)
* fix(ci): fix Publish workflow startup_failure * fix(ci): fix Publish workflow startup_failure
This commit is contained in:
parent
5c41e54297
commit
832376c598
1 changed files with 4 additions and 5 deletions
|
|
@ -12,7 +12,6 @@ permissions:
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
name: Publish
|
name: Publish
|
||||||
# Check if the PR is not from a fork
|
|
||||||
if: github.repository_owner == 'samber'
|
if: github.repository_owner == 'samber'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -22,15 +21,15 @@ jobs:
|
||||||
- name: Set up Ruby
|
- name: Set up Ruby
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: 3.4
|
ruby-version: '3.4'
|
||||||
|
|
||||||
- name: Set up yq
|
- name: Set up yq
|
||||||
uses: mikefarah/yq@v4
|
uses: mikefarah/yq@v4
|
||||||
|
|
||||||
- name: Install liquid
|
- name: Install liquid
|
||||||
run: |
|
run: |
|
||||||
gem install liquid -v 5.5.1
|
gem install liquid -v 5.5.1
|
||||||
gem install liquid-cli
|
gem install liquid-cli
|
||||||
|
|
||||||
- name: Build rule configuration
|
- name: Build rule configuration
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -43,7 +42,7 @@ jobs:
|
||||||
mkdir -p "${subdir}"
|
mkdir -p "${subdir}"
|
||||||
|
|
||||||
# groupName=$(echo "{% assign groupName = name | split: ' ' %}{% capture groupNameCamelcase %}{% for word in groupName %}{{ word | capitalize }} {% endfor %}{% endcapture %} {{ groupNameCamelcase | remove: ' ' | remove: '-' }}" | liquid $(echo ${service} | base64 --decode | jq -r '.name | ascii_downcase | split(" ") | join("-")'))
|
# groupName=$(echo "{% assign groupName = name | split: ' ' %}{% capture groupNameCamelcase %}{% for word in groupName %}{{ word | capitalize }} {% endfor %}{% endcapture %} {{ groupNameCamelcase | remove: ' ' | remove: '-' }}" | liquid $(echo ${service} | base64 --decode | jq -r '.name | ascii_downcase | split(" ") | join("-")'))
|
||||||
|
|
||||||
for exporter in $(echo ${service} | base64 --decode | jq -r '.exporters[] | @base64'); do
|
for exporter in $(echo ${service} | base64 --decode | jq -r '.exporters[] | @base64'); do
|
||||||
exporterName=$(echo ${exporter} | base64 --decode | jq -r '.slug')
|
exporterName=$(echo ${exporter} | base64 --decode | jq -r '.slug')
|
||||||
cat dist/template.yml | liquid "$(echo ${exporter} | base64 --decode)" > ${subdir}/${exporterName}.yml
|
cat dist/template.yml | liquid "$(echo ${exporter} | base64 --decode)" > ${subdir}/${exporterName}.yml
|
||||||
Loading…
Reference in a new issue