Skip to content

feat: simplify CI workflows#504

Draft
aslafy-z wants to merge 3 commits intomainfrom
feat/ci
Draft

feat: simplify CI workflows#504
aslafy-z wants to merge 3 commits intomainfrom
feat/ci

Conversation

@aslafy-z
Copy link
Copy Markdown
Collaborator

@aslafy-z aslafy-z commented May 9, 2026

Follow-up of #246

Based over @d3adb5 work.

d3adb5 added 3 commits May 9, 2026 16:08
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 thread .github/workflows/cd.yaml
Comment on lines +17 to +22
uses: ./.github/workflows/ci.yaml
secrets: inherit
with:
skip-slack-notification: true

bump-version:
Comment thread .github/workflows/cd.yaml
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 thread .github/workflows/cd.yaml
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 thread .github/workflows/cd.yaml
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 }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants