fix: container cluster test cases #86
This file contains hidden or 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@a660677d5469627102a1c1e11409dd063606628d # v3.0.0 | |
| with: | |
| token: ${{ secrets.FLANKBOT }} | |
| pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} | |
| merge-method: squash | |
| repository: flanksource/${{ matrix.repos }} | |
| goreleaser: | |
| runs-on: ubuntu-latest | |
| permissions: write-all | |
| needs: [semantic-release] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 | |
| with: | |
| go-version: stable | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0 | |
| with: | |
| distribution: goreleaser | |
| version: "~> v2" | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |