Update actions/setup-python action to v5.1.1 (#195) #229
This file contains 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
--- | |
name: Release Charts | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'README.md' | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
- name: Install yamllint | |
run: pip install yamllint | |
- name: Lint YAML files | |
run: yamllint . | |
test-charts: | |
needs: lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: actions/[email protected] | |
- uses: azure/setup-helm@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get changed files in the charts folder | |
id: changed-files-specific | |
uses: tj-actions/changed-files@v40 | |
with: | |
files: charts | |
- name: Create k8s Kind Cluster | |
if: steps.changed-files-specific.outputs.any_changed == 'true' | |
uses: helm/[email protected] | |
- name: Install kubectl | |
if: steps.changed-files-specific.outputs.any_changed == 'true' | |
uses: Azure/setup-kubectl@v4 | |
- name: Run lint for any chart concerned by the commit | |
if: steps.changed-files-specific.outputs.any_changed == 'true' | |
run: | | |
.github/workflows/lint_modified_charts.sh ${{ steps.changed-files-specific.outputs.all_changed_files }} | |
- name: Run test for any chart concerned by the commit | |
if: steps.changed-files-specific.outputs.any_changed == 'true' | |
run: | | |
.github/workflows/deploy_modified_charts.sh ${{ steps.changed-files-specific.outputs.all_changed_files }} | |
release: | |
needs: test-charts | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | |
with: | |
fetch-depth: 0 | |
ref: main | |
token: ${{ env.GH_TOKEN }} | |
- name: Setup Python | |
uses: actions/[email protected] | |
- name: Helm common repo | |
continue-on-error: true | |
run: | | |
helm repo add common https://rubxkube.github.io/common-charts | |
helm repo add bitnami https://charts.bitnami.com/bitnami | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- name: Run chart-releaser | |
uses: helm/[email protected] | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Ping notifier | |
run: | | |
curl -s ${{ secrets.WEBHOOK_NOTIFIER_SUCCESS }} > /dev/null | |
- name: Modifying the readme on main | |
continue-on-error: true | |
run: | | |
git pull | |
git checkout main | |
cd .github/workflows/ | |
python -m pip install -r requirements.txt | |
python3 get_readme.py | |
cd ../.. | |
git add README.md | |
git commit -m ":lock: Auto-Update README with Charts versions" | |
git push -f | |
- name: Setup Pandoc | |
uses: nikeee/setup-pandoc@v1 | |
- name: Modifying index.html | |
continue-on-error: true | |
run: | | |
index=$(pandoc --from gfm README.md --to html5 --standalone --toc --citeproc --no-highlight) | |
git checkout gh-pages | |
echo $index > index.html | |
git add index.html | |
git commit -m "[AUTO] Update index.html of gh-pages" | |
git push |