Skip to content

Commit

Permalink
ci: Make publish helm chart and create release workflows sequential (#…
Browse files Browse the repository at this point in the history
…814)

**Reason for Change**:
As part of tighten the security for Kaito pipelines, we enforced
approval-based for all workflows that perform writing to the repo. One
of the side effects of this was a required approval for the auto
triggered 'pages build and deployment' workflow which was missing - and
it will get canceled when creating a new release - and caused the helm
github page repo to not get updated (#808).

As a solution to that, we will change the Make publish helm chart and
create release workflows to run sequentially instead of parallel, so new
release won't get created until all (including github pages) are updated
successfully.


**Requirements**

- [ ] added unit tests and e2e tests (if applicable).

**Issue Fixed**:
<!-- If this PR fixes GitHub issue 4321, add "Fixes #4321" to the next
line. -->

**Notes for Reviewers**:

Signed-off-by: Heba Elayoty <[email protected]>
  • Loading branch information
helayoty authored Jan 10, 2025
1 parent dcc0b3b commit 5ad5cae
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/helm-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: publish_helm_chart

on:
repository_dispatch:
types: [ create-release ]
types: [ publish-helm-chart ]
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -36,3 +36,15 @@ jobs:
charts_dir: charts/kaito
target_dir: charts/kaito
linting: off

create-release:
runs-on: ubuntu-latest
needs: [ publish-helm ]
steps:
- name: 'Dispatch release tag to create a release'
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
event-type: create-release
client-payload: '{"tag": "${{ github.event.client_payload.tag }}"}'

6 changes: 3 additions & 3 deletions .github/workflows/publish-workspace-mcr-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ jobs:
VERSION: ${{ needs.get-tag.outputs.release-tag }}
REGISTRY: ${{ secrets.KAITO_MCR_REGISTRY }}/public/aks/kaito

create-release:
publish-helm-chart:
runs-on: ubuntu-latest
needs: [ build-publish-mcr-image ]
steps:
- name: 'Dispatch release tag'
- name: 'Dispatch release tag for helm chart'
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
event-type: create-release
event-type: publish-helm-chart
client-payload: '{"tag": "${{ github.event.client_payload.tag }}"}'

0 comments on commit 5ad5cae

Please sign in to comment.