Conversation
Simplify the continuous integration workflow by renaming it and making most of the jobs run in parallel. Additionally, the workflow runs on a GitHub hosted runner instead of the Single Node OpenShift runner.
Simplify the CD workflow by invoking a CI build instead of reproducing CI steps on it, as well as splitting the remaining part of the workflow into multiple jobs.
Remove the Tiltfile and Tiltfile-delete files, since Tilt is no longer executed in CI. This is being done in a separate commit so that should Tilt be re-introduced, the files can be restored with a simple revert.
Comment on lines
+17
to
+22
| uses: ./.github/workflows/ci.yaml | ||
| secrets: inherit | ||
| with: | ||
| skip-slack-notification: true | ||
|
|
||
| bump-version: |
Comment on lines
+23
to
+42
| name: Bump Version | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| next_version: ${{ steps.get_next_version.outputs.version }} | ||
| has_next_version: ${{ steps.get_next_version.outputs.hasNextVersion }} | ||
| if: ${{ vars.RELEASE_CIRCUIT_BREAKER == 'false' }} | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Get next version | ||
| id: get_next_version | ||
| uses: thenativeweb/get-next-version@067dc4602577f4f61a51c3f4664552283a228c60 # 2.7.1 | ||
| - name: Show the next version | ||
| run: | | ||
| echo Has next version: ${{ steps.get_next_version.outputs.hasNextVersion }} | ||
| echo Next version: ${{ steps.get_next_version.outputs.version }} | ||
|
|
||
| push-changes: |
Comment on lines
+43
to
+98
| name: Publish Chart | ||
| runs-on: ubuntu-latest | ||
| needs: | ||
| - call-ci-workflow | ||
| - bump-version | ||
| if: needs.bump-version.outputs.has_next_version == 'true' | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | ||
| with: | ||
| persist-credentials: false | ||
| fetch-depth: 0 | ||
| - name: Update Chart Version | ||
| env: | ||
| VERSION: ${{ needs.bump-version.outputs.next_version }} | ||
| run: | | ||
| make bump-chart | ||
| - name: Publish Helm chart | ||
| uses: stefanprodan/helm-gh-pages@89c6698c192e70ed0e495bee7d3d1ca5b477fe82 | ||
| with: | ||
| branch: master | ||
| repository: stakater-charts | ||
| target_dir: docs | ||
| token: ${{ secrets.PUBLISH_TOKEN }} | ||
| charts_dir: . | ||
| charts_url: https://stakater.github.io/stakater-charts | ||
| owner: stakater | ||
| linting: off | ||
| commit_username: stakater-user | ||
| commit_email: stakater@gmail.com | ||
| - name: Commit updated artifacts | ||
| id: commit | ||
| run: | | ||
| git config --local user.email "stakater@gmail.com" | ||
| git config --local user.name "stakater-user" | ||
| git status | ||
| git add application/Chart.yaml | ||
| git commit -m "chore: Update artifacts [skip-ci]" --allow-empty | ||
| echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | ||
| - name: Push updated artifacts | ||
| uses: ad-m/github-push-action@57116acb309081ee57864270b0e3c4cedbe45452 | ||
| with: | ||
| github_token: ${{ secrets.PUBLISH_TOKEN }} | ||
| - name: Create tag | ||
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 | ||
| with: | ||
| github-token: ${{ secrets.PUBLISH_TOKEN }} | ||
| script: | | ||
| github.rest.git.createRef({ | ||
| owner: context.repo.owner, | ||
| repo: context.repo.repo, | ||
| ref: 'refs/tags/v${{ needs.bump-version.outputs.next_version }}', | ||
| sha: '${{ steps.commit.outputs.sha }}' | ||
| }) | ||
|
|
||
| notify: |
Comment on lines
+99
to
+123
| name: Notify Results | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 5 | ||
| needs: | ||
| - call-ci-workflow | ||
| - bump-version | ||
| - push-changes | ||
| if: always() | ||
| steps: | ||
| - id: workflow | ||
| name: Compute workflow status | ||
| run: | | ||
| if [ "${{ contains(needs.*.result, 'failure') }}" = "true" ]; then | ||
| echo "status=failure" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "status=success" >> "$GITHUB_OUTPUT" | ||
| fi | ||
| - name: Notify Slack | ||
| uses: 8398a7/action-slack@77eaa4f1c608a7d68b38af4e3f739dcd8cba273e # v3.19.0 | ||
| if: always() | ||
| with: | ||
| status: ${{ steps.workflow.outputs.status }} | ||
| fields: repo,author,action,eventName,ref,workflow | ||
| env: | ||
| SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }} |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up of #246
Based over @d3adb5 work.