Skip to content

Commit

Permalink
ci: Update charts CI to include the new swan-cern-system chart
Browse files Browse the repository at this point in the history
This is to bump the chart version automatically, through the CI,
everytime there are changes.
  • Loading branch information
PMax5 committed Aug 28, 2024
1 parent a5a91ad commit 59576cf
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/check-charts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ jobs:
- run: helm dependency update swan && helm lint swan && helm package swan

- run: helm dependency update swan-cern && helm lint swan-cern && helm package swan-cern

- run: helm dependency update swan-cern-system && helm lint swan-cern-system && helm package swan-cern-system
2 changes: 1 addition & 1 deletion .github/workflows/list-changed-charts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" || exit; pwd;)"

cd "${script_dir}/../../" # cd to the root of the repo

CHARTS=("swan" "swan-cern")
CHARTS=("swan" "swan-cern" "swan-cern-system")

for CHART_NAME in "${CHARTS[@]}"; do

Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/release-charts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ on:
- minor
- patch

bump_swan_cern_system:
description: "Bump version for swan-cern-system/"
required: false
default: patch
type: choice
options:
- major
- minor
- patch

jobs:
check_branch:
runs-on: ubuntu-latest
Expand All @@ -59,6 +69,7 @@ jobs:
outputs:
swan_has_changed: ${{ steps.diff.outputs.swan_has_changed }}
swan-cern_has_changed: ${{ steps.diff.outputs.swan-cern_has_changed }}
swan-cern-system_has_changed: ${{ steps.diff.outputs.swan-cern-system_has_changed }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand Down Expand Up @@ -135,3 +146,15 @@ jobs:
WORKFLOW_ACCESS_TOKEN: ${{ secrets.WORKFLOW_ACCESS_TOKEN }}
HELM_REPO_USERNAME: ${{ secrets.HELM_REPO_USERNAME }}
HELM_REPO_PASSWORD: ${{ secrets.HELM_REPO_PASSWORD }}

tag_swan_cern_system:
needs: [check_charts, list_changed_charts]
if: needs.list_changed_charts.outputs.swan-cern-system_has_changed == 'true'
uses: ./.github/workflows/tag-chart.yaml
with:
chart: swan
bump: ${{ inputs.bump_swan_cern_system }}
secrets:
WORKFLOW_ACCESS_TOKEN: ${{ secrets.WORKFLOW_ACCESS_TOKEN }}
HELM_REPO_USERNAME: ${{ secrets.HELM_REPO_USERNAME }}
HELM_REPO_PASSWORD: ${{ secrets.HELM_REPO_PASSWORD }}

0 comments on commit 59576cf

Please sign in to comment.