Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
9dcb78d
Merge pull request #6 from aphp/dev
kzgrzendek Dec 1, 2025
ad213a3
Add linter for Workflow Config File
Nicolas-Delahaye Feb 26, 2026
a0addff
set branches
Nicolas-Delahaye Feb 26, 2026
c9e2a96
Merge branch 'main' into 9-lint-yaml-file-in-ci
Nicolas-Delahaye Feb 26, 2026
4eb213b
update rules
Nicolas-Delahaye Feb 26, 2026
8039424
Fix config on CI Linter
Nicolas-Delahaye Feb 26, 2026
531a718
fix Yaml Linter error
Nicolas-Delahaye Feb 26, 2026
f0a1de0
Fix Linter Errors
Nicolas-Delahaye Feb 26, 2026
685e910
Fix :
Nicolas-Delahaye Feb 26, 2026
6c23585
add exclusion OCI helm repository
Nicolas-Delahaye Feb 26, 2026
60d508b
refactoring + set path
Nicolas-Delahaye Feb 26, 2026
0b90f3a
rebuild DEV / SNAPSHOT every time called
Nicolas-Delahaye Feb 26, 2026
23af237
fix chart release that not update index.yaml
Nicolas-Delahaye Feb 26, 2026
d93948f
fix yaml lint errors
Nicolas-Delahaye Feb 26, 2026
9be46b5
refactor
Nicolas-Delahaye Feb 26, 2026
9404755
update version of tools used by the workflow
Nicolas-Delahaye Feb 26, 2026
8780a1a
add checkout
Nicolas-Delahaye Feb 26, 2026
af45ebc
set the version of helm (same in all steps)
Nicolas-Delahaye Feb 26, 2026
0b7ced6
Log more info for the name of the version
Nicolas-Delahaye Feb 26, 2026
d315eaf
Update config for chart-Releaser
Nicolas-Delahaye Feb 26, 2026
3a88519
skip upload if it is already made
Nicolas-Delahaye Feb 26, 2026
21e7387
remove download
Nicolas-Delahaye Feb 26, 2026
dcba3aa
try without upload / download at each job the chart
Nicolas-Delahaye Feb 26, 2026
d9ba7c2
Need source for Polaris Scan
Nicolas-Delahaye Feb 26, 2026
dbf17b5
Delete release before create it again
Nicolas-Delahaye Feb 26, 2026
e96af77
skip if existe
Nicolas-Delahaye Feb 26, 2026
83492df
from main
Nicolas-Delahaye Feb 26, 2026
3490da0
new line at end of file
Nicolas-Delahaye Feb 26, 2026
214f839
test option with index
Nicolas-Delahaye Feb 27, 2026
44e0c1a
add feature branch in release process
Nicolas-Delahaye Feb 27, 2026
13cd982
Choose the right package-path
Nicolas-Delahaye Feb 27, 2026
6435a8a
fix linter error : Error: ub/workflows/chart-ci.yml:361:1: [error] to…
Nicolas-Delahaye Feb 27, 2026
a2f5aa8
remove CR releaser
Nicolas-Delahaye Feb 27, 2026
22a6393
downgrade chart-releaser plugin
Nicolas-Delahaye Feb 27, 2026
4e7ca7a
remove download chart
Nicolas-Delahaye Feb 27, 2026
fb97151
[Temporary] Disable Helm, Checkout, Downloard pakaged Chart
Nicolas-Delahaye Feb 27, 2026
4543b6d
Add Chechout step
Nicolas-Delahaye Feb 27, 2026
29c9bcf
Add Helm
Nicolas-Delahaye Feb 27, 2026
cfa770b
All do in 1 job
Nicolas-Delahaye Feb 27, 2026
89b73a7
Adjust task order in the job
Nicolas-Delahaye Feb 27, 2026
dadbbab
Replace chart-releaser by specifics steps.
Nicolas-Delahaye Feb 27, 2026
fd756a8
uncomment the right step for snapshot version name
Nicolas-Delahaye Feb 27, 2026
8b5a001
remove tag creation
Nicolas-Delahaye Feb 27, 2026
90b8586
add login for fetch gh-pages
Nicolas-Delahaye Feb 27, 2026
e19d56f
Clean before MR
Nicolas-Delahaye Feb 27, 2026
04e9106
add merge with helm before cr index
Nicolas-Delahaye Feb 27, 2026
7a098c4
update url in index.yaml
Nicolas-Delahaye Feb 27, 2026
2084352
update index with cr_releaser 1.7.0
Nicolas-Delahaye Feb 27, 2026
5b2453a
Fix for "chart-cr" action bug https://github.com/helm/chart-releaser-…
Nicolas-Delahaye Feb 27, 2026
225266b
same error
Nicolas-Delahaye Feb 27, 2026
20b7b81
Put latest tag at the right step
Nicolas-Delahaye Mar 2, 2026
4b9a32d
again : latest_tag
Nicolas-Delahaye Mar 2, 2026
0aadd31
Latest tag
Nicolas-Delahaye Mar 2, 2026
8ed5c3b
Latest
Nicolas-Delahaye Mar 2, 2026
5178c5b
Latest tag from $tag
Nicolas-Delahaye Mar 2, 2026
6350628
Latest
Nicolas-Delahaye Mar 2, 2026
ed7c1db
export latest
Nicolas-Delahaye Mar 2, 2026
de6a711
CR and GH
Nicolas-Delahaye Mar 2, 2026
9640112
Prepare git for chart-releaser
Nicolas-Delahaye Mar 2, 2026
49ef861
Latest
Nicolas-Delahaye Mar 2, 2026
f69207e
CR update
Nicolas-Delahaye Mar 2, 2026
294e3e7
do it by cr
Nicolas-Delahaye Mar 2, 2026
e41ee17
Fix version in chart.
Nicolas-Delahaye Mar 2, 2026
1ceed12
Update CR rags + upload release
Nicolas-Delahaye Mar 2, 2026
d345dcc
remove upload in case : immutable release
Nicolas-Delahaye Mar 2, 2026
183735d
Cr args : owner and repo
Nicolas-Delahaye Mar 2, 2026
57ac9a4
Remove unused instructions
Nicolas-Delahaye Mar 2, 2026
dc765d5
Add git login
Nicolas-Delahaye Mar 2, 2026
b750483
remove OCI in dependancies list
Nicolas-Delahaye Mar 2, 2026
0df09bc
Remove Hardcode
Nicolas-Delahaye Mar 2, 2026
893a201
lower ?
Nicolas-Delahaye Mar 2, 2026
a686892
name use for tag and for CR
Nicolas-Delahaye Mar 2, 2026
f44d581
Name
Nicolas-Delahaye Mar 2, 2026
007cca4
Name
Nicolas-Delahaye Mar 2, 2026
09fdf47
Name
Nicolas-Delahaye Mar 2, 2026
c16fa00
Name
Nicolas-Delahaye Mar 2, 2026
70d5f64
Name
Nicolas-Delahaye Mar 2, 2026
efbfe2b
Name
Nicolas-Delahaye Mar 2, 2026
f724452
looking for folder structure load for gh-pages branch
Nicolas-Delahaye Mar 3, 2026
bdc67e6
Name
Nicolas-Delahaye Mar 3, 2026
89b1338
Name .
Nicolas-Delahaye Mar 3, 2026
6108910
Ref the commit that run the workflow
Nicolas-Delahaye Mar 3, 2026
e639780
Add changelog.md as ref to release
Nicolas-Delahaye Mar 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 75 additions & 61 deletions .github/workflows/chart-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ jobs:

- name: Extract and add Helm repositories
run: |
yq eval -r '
yq eval -r '
.dependencies[]
| select(.repository != "oci://*")
| "\(.name) \(.repository)"
' "${{ inputs.chart-dir }}/Chart.yaml" \
| while read -r name repo; do
helm repo add "$name" "$repo"
done
done

helm repo update

- name: Install chart dependencies
Expand Down Expand Up @@ -274,76 +276,88 @@ jobs:
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"

# Fix for "chart-cr" action bug https://github.com/helm/chart-releaser-action/issues/171#issuecomment-2372464055
git fetch --tags
latest_tag=$(git tag --sort=-creatordate | head -n 1 || true)
echo "latest_tag=$latest_tag" >> "$GITHUB_OUTPUT"

- name: Download packaged Chart
uses: actions/download-artifact@v4
with:
name: packaged-chart
path: ${{ inputs.chart-dir }}

- name: Install Helm
uses: azure/setup-helm@v4.3.1
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

- name: Extract and add Helm repositories
run: |
yq eval -r '
.dependencies[]
| "\(.name) \(.repository)"
' "${{ inputs.chart-dir }}/Chart.yaml" \
| while read -r name repo; do
helm repo add "$name" "$repo"
done
helm repo update

### Release steps specific to `feature` branch ###
# ### Release steps specific to `feature` branch ###
- name: Add release suffix - SNAPSHOT
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/dev'
run: |
VERSION_SUFFIX="-snapshot.$(git rev-parse --short ${{ github.sha }})" \
VERSION_SUFFIX="-snapshot-$(git rev-parse --short ${{ github.sha }})" \
yq -i '.version |= . + env(VERSION_SUFFIX)' ${{ inputs.chart-dir }}/Chart.yaml

- name: Run chart-releaser - SNAPSHOT
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/dev'
uses: helm/chart-releaser-action@v1.7.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
skip_existing: true
mark_as_latest: false

### Release steps specific to `dev` branch ###
- name: Add release suffix - DEV
if: github.ref == 'refs/heads/dev'
run: |
VERSION_SUFFIX="-dev.$(git rev-parse --short ${{ github.sha }})" \
VERSION_SUFFIX="-dev-$(git rev-parse --short ${{ github.sha }})" \
yq -i '.version |= . + env(VERSION_SUFFIX)' ${{ inputs.chart-dir }}/Chart.yaml

- name: Run chart-releaser - DEV
if: github.ref == 'refs/heads/dev'
uses: helm/chart-releaser-action@v1.7.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
skip_existing: true
mark_as_latest: false
- name: Package chart
run: |
helm package ${{ inputs.chart-dir }} -d .cr-release-packages/

# ### Prepare release variables ###
- name: Prepare release variables
id: prepare-release
run: |
git fetch origin gh-pages
name=$(git show origin/gh-pages:index.yaml | yq e '.entries | keys | .[0]' 2>/dev/null || echo " ??? ")

VERSION=$(yq '.version' ${{ inputs.chart-dir }}/Chart.yaml)

TAG_NAME="${name}-${VERSION}"

echo "TAG_NAME=$TAG_NAME" >> $GITHUB_OUTPUT
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT

### Release steps specific to `main` branch ###
- name: Run chart-releaser - MAIN
# ### Release steps specific to `feature` or `dev` branch ###
- name: Create GitHub pre-release + tag
if: github.ref != 'refs/heads/main'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "${{ steps.prepare-release.outputs.TAG_NAME }}" \
.cr-release-packages/*.tgz \
--prerelease \
--title "${{ steps.prepare-release.outputs.TAG_NAME }}" \
--target ${{ github.sha}} \
--notes "Version from ${{ github.ref_name }}" \
-F CHANGELOG.md

# ### Release steps specific to `main` branch ###
- name: Create GitHub release + tag
if: github.ref == 'refs/heads/main'
uses: helm/chart-releaser-action@v1.7.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
skip_existing: true
mark_as_latest: true
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "${{ steps.prepare-release.outputs.TAG_NAME }}" \
.cr-release-packages/*.tgz \
--latest \
--target ${{ github.sha}} \
--title "${{ steps.prepare-release.outputs.TAG_NAME }}" \
--notes "Version from ${{ github.ref_name }}" \
-F CHANGELOG.md

- name: Update index.yaml on gh-pages
env:
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"

# Get gh-pages
git fetch origin gh-pages
mkdir -p .cr-index
git show origin/gh-pages:index.yaml > .cr-index/index.yaml 2>/dev/null || echo "apiVersion: v1\nentries: {}" > .cr-index/index.yaml

echo "Merge index.yaml with new chart version..."
helm repo index .cr-index \
--url https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }} \
--merge .cr-index/index.yaml

args=(-o "${{ github.repository_owner }}" -r "${{ github.event.repository.name }}" --push)

echo "Installing chart-releaser on $install_dir..."
curl -sSLo cr.tar.gz "https://github.com/helm/chart-releaser/releases/download/v1.8.1/chart-releaser_1.8.1_linux_amd64.tar.gz"
tar -xzf cr.tar.gz -C "/usr/local/bin/"
rm -f cr.tar.gz

cr index "${args[@]}"
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches-ignore:
- "main"
pull_request:
branches: ["main", "dev"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- name: yaml-lint
uses: ibiqlik/action-yamllint@v3.1.1
with:
config_data: |
extends: default
rules:
trailing-spaces:
level: warning
line-length: disable # don't bother me with this rule
comments-indentation: disable # don't bother me with this rule
7 changes: 3 additions & 4 deletions .github/workflows/container-ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: build

on:
Expand Down Expand Up @@ -369,14 +370,12 @@ jobs:
format: 'table'
trivyignores: 'ci-trivy-ignore.txt'


push-docker-image:
name: Image Push to GHCR
needs:
- image-audit
- image-scan
- image-audit
- image-scan
runs-on: ubuntu-24.04

steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down