Skip to content

Commit

Permalink
Merge pull request #1720 from rabbitmq/update-workflows
Browse files Browse the repository at this point in the history
Updates to workflows
  • Loading branch information
Zerpet authored Sep 4, 2024
2 parents fc564a3 + 563996a commit 1af0156
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 51 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ jobs:
if: ${{ github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/v') }}
needs:
- build_operator
permissions:
contents: 'read'
id-token: 'write'
env:
image_version: ${{ needs.build_operator.outputs.image_tag }}
steps:
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/prometheus-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ on:
paths:
- observability/prometheus/rules/**/*.y*ml

env:
GO_VERSION: ~1.21

jobs:
rules:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout code

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/checkout@v4
go-version-file: "go.mod"

- name: Create Prometheus rule file
run: |
make install-tools
Expand All @@ -35,6 +35,7 @@ jobs:
append_rabbitmq_rules='select(fileIndex==0).groups.[1].rules = select(fileIndex==0).groups.[1].rules + select(fileIndex==1).spec.groups.[0].rules | select(fileIndex==0)'
find rules/rabbitmq -name "*.y*ml" ! -name recording-rules.yml -exec yq eval-all --inplace --no-colors --prettyPrint "$append_rabbitmq_rules" rule-file.yml {} ';'
yq eval-all --inplace --no-colors --prettyPrint "$append_rabbitmq_rules" rule-file.yml rules/rabbitmq/recording-rules.yml
- name: Check Prometheus rule file
run: |
# need to use @main because of https://github.com/prometheus/prometheus/issues/8586#issuecomment-796976710
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/publish-versioned-api-ref.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@ jobs:
uses: actions/checkout@v4
with:
path: cluster-operator

- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
run: echo VERSION=${GITHUB_REF#refs/tags/} >> "$GITHUB_OUTPUT"

- name: Checkout wiki codebase
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}.wiki
path: wiki

- name: Push to wiki
run: |
cd wiki
Expand All @@ -36,10 +39,11 @@ jobs:
git add ./API_Reference_${{ steps.get_version.outputs.VERSION }}.asciidoc
git add ./Wiki_Sidebar.md
git commit -m "Publish version ${{ steps.get_version.outputs.VERSION }} API Reference" && git push
- uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,action,eventName
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- name: Notify Google Chat
if: failure()
uses: SimonScholz/google-chat-action@main
with:
webhookUrl: '${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}'
jobStatus: ${{ job.status }}
title: Cluster Operator - ${{ github.workflow }}
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
uses: actions/checkout@v4

- name: Update new version in krew-index
uses: rajatjindal/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Close Stale Issues
uses: actions/stale@v9.0.0
uses: actions/stale@v9
with:
# Token for the repository. Can be passed in using `{{ secrets.GITHUB_TOKEN }}`.
repo-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
37 changes: 0 additions & 37 deletions .github/workflows/update-latest-api-ref.yml

This file was deleted.

0 comments on commit 1af0156

Please sign in to comment.