feat: detect frequently restarting pods (#71) #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Release | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
jobs: | |
semantic-release: | |
permissions: | |
contents: write # for codfish/semantic-release-action to create release tags | |
runs-on: ubuntu-latest | |
outputs: | |
release-version: ${{ steps.semantic.outputs.release-version }} | |
new-release-published: ${{ steps.semantic.outputs.new-release-published }} | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | |
with: | |
submodules: true | |
- uses: codfish/semantic-release-action@cbd853afe12037afb1306caca9d6b1ab6a58cf2a # v1.10.0 | |
id: semantic | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
bump-clients: | |
runs-on: ubuntu-latest | |
needs: [semantic-release] | |
if: needs.semantic-release.outputs.new-release-published == 'true' | |
strategy: | |
matrix: | |
repos: ['mission-control', 'canary-checker', 'commons', 'config-db', 'gomplate'] | |
steps: | |
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3 | |
with: | |
repository: flanksource/${{ matrix.repos }} | |
token: ${{ secrets.FLANKBOT }} | |
- name: Setup Go | |
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | |
with: | |
go-version: v1.22.x | |
- name: Create commits | |
run: | | |
# Sleep to let index refresh | |
sleep 60 | |
go get github.com/flanksource/is-healthy@v${{ needs.semantic-release.outputs.release-version }} | |
go mod tidy | |
if [ -d "hack/generate-schemas" ]; then | |
cd hack/generate-schemas && go mod tidy | |
fi | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5 | |
with: | |
branch: 'bump-is-healthy-auto-pr' | |
commit-message: 'chore: bump is-healthy to v${{ needs.semantic-release.outputs.release-version }}' | |
title: 'chore: bump is-healthy to v${{ needs.semantic-release.outputs.release-version }}' | |
token: ${{ secrets.FLANKBOT }} | |
labels: dependencies | |
- name: Enable Pull Request Automerge | |
if: steps.cpr.outputs.pull-request-operation == 'created' | |
uses: peter-evans/enable-pull-request-automerge@v3 | |
with: | |
token: ${{ secrets.FLANKBOT }} | |
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} | |
merge-method: squash | |
repository: flanksource/${{ matrix.repos }} |