TrueChartsClone/.github/workflows/charts-release.yaml

130 lines
4.0 KiB
YAML
Raw Normal View History

name: "Charts: Release"
2022-03-30 10:26:37 +00:00
concurrency: helm-release
on:
workflow_dispatch:
push:
branches:
- master
paths:
- "charts/**"
jobs:
release-helm:
runs-on: actions-runner-large
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
token: ${{ secrets.BOT_TOKEN }}
fetch-depth: 0
fix(ci): don't fail if directory exists (#8810) **Description** <!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. --> ⚒️ Fixes # <!--(issue)--> Fixes: https://github.com/truecharts/charts/actions/runs/4907026867/jobs/8761876861 **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** <!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration --> **📃 Notes:** <!-- Please enter any other relevant information here --> **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._
2023-05-07 15:42:53 +00:00
- name: Get Changelog Format Version
shell: bash
run: |
ver=$(./charttool genchangelog format-version)
key="changelog-json-format-$ver"
echo "Cache Key is: $key"
echo "CHANGELOG_CACHE_KEY=$key" >> $GITHUB_ENV
- name: Cache Changelog
id: cache-changelog
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
with:
path: changelog.json.gz
key: ${{ env.CHANGELOG_CACHE_KEY }}
- name: Generate Changelog
shell: bash
run: |
export REPO_PATH="./"
2024-05-31 21:18:40 +00:00
export TEMPLATE_PATH="./templates/CHANGELOG.md.tmpl"
export OUTPUT_DIR="./changelogs"
export JSON_FILE="changelog.json"
2024-05-31 21:48:59 +00:00
ls -l
2024-05-31 21:18:40 +00:00
if [ -f "$JSON_FILE.gz" ]; then
gunzip "$JSON_FILE.gz" --force # Force overwrite if file already exists
fi
2024-05-31 21:22:18 +00:00
./charttool genchangelog "$REPO_PATH" "$TEMPLATE_PATH" "$OUTPUT_DIR"
gzip "$JSON_FILE" --best
- name: Checkout Helm-Staging
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
fetch-depth: 1
repository: truecharts/helm-staging
token: ${{ secrets.BOT_TOKEN }}
path: helm
- name: Fix Pre-Commit issues
shell: bash
run: |
echo "Running pre-commit test-and-cleanup..."
pre-commit run --all ||:
# Fix sh files to always be executable
find . -name '*.sh' | xargs chmod +x
fix(ci): don't fail if directory exists (#8810) **Description** <!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. --> ⚒️ Fixes # <!--(issue)--> Fixes: https://github.com/truecharts/charts/actions/runs/4907026867/jobs/8761876861 **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** <!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration --> **📃 Notes:** <!-- Please enter any other relevant information here --> **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ I increased versions for any altered app according to semantic versioning **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🪞 I have opened a PR on [truecharts/containers](https://github.com/truecharts/containers) adding the container to TrueCharts mirror repo. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._
2023-05-07 15:42:53 +00:00
- name: Commit Helm Changes
run: |
rm -rf helm/charts
mkdir helm/charts
cp -rf charts helm
2024-05-31 21:29:54 +00:00
echo "Copying changelogs to helm"
2024-05-31 21:48:59 +00:00
cp -r ./changelogs/** ./helm/charts/
- name: Commit Helm Changes
run: |
cd helm
git config user.name "TrueCharts-Bot"
git config user.email "bot@truecharts.org"
git add --all
git commit -sm "Commit released Helm Charts for TrueCharts" || exit 0
git push
cd -
2022-04-01 06:39:13 +00:00
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
2022-04-01 06:39:13 +00:00
with:
fetch-depth: 1
repository: truecharts/website
2022-04-01 06:39:13 +00:00
token: ${{ secrets.BOT_TOKEN }}
path: website
2022-04-01 06:34:12 +00:00
- name: Copy docs to website
2022-04-01 07:27:52 +00:00
shell: bash
2022-04-01 06:34:12 +00:00
run: |
2022-04-01 07:17:25 +00:00
#!/bin/bash
2024-05-12 17:57:58 +00:00
echo "Maing sure directories exist..."
mkdir -p website/public/img/hotlink-ok/chart-icons || echo "chart-icons path already exists, continuing..."
mkdir -p website/public/img/hotlink-ok/chart-icons-small || echo "chart-icons-small path already exists, continuing..."
mkdir -p website/src/assets || echo "assets path already exists, continuing..."
./charttool genchartlist ./charts
mv charts.json website/src/assets/charts.json
2024-05-12 17:57:58 +00:00
2024-05-31 21:18:40 +00:00
echo "Copying changelogs to docs"
2024-05-31 21:48:59 +00:00
cp -r ./changelogs/** ./website/src/content/docs/charts/
2024-05-31 21:18:40 +00:00
2024-05-12 22:48:54 +00:00
export DEBUG=false
2024-05-12 19:41:41 +00:00
export STRICT=true
2024-05-12 19:46:23 +00:00
go-yq --version
2024-05-12 19:41:41 +00:00
2024-06-09 11:09:19 +00:00
for item in charts/*/*/Chart.yaml; do
feat: Use remade changelog generator (#22476) **Description** <!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. --> ⚒️ Fixes # <!--(issue)--> **⚙️ Type of change** - [ ] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** <!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration --> **📃 Notes:** <!-- Please enter any other relevant information here --> **✔️ Checklist:** - [ ] ⚖️ My code follows the style guidelines of this project - [ ] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [ ] ⬆️ I increased versions for any altered app according to semantic versioning - [ ] I made sure the title starts with `feat(chart-name):`, `fix(chart-name):` or `chore(chart-name):` **➕ App addition** If this PR is an app addition please make sure you have done the following. - [ ] 🖼️ I have added an icon in the Chart's root directory called `icon.png` --- _Please don't blindly check all the boxes. Read them and only check those that apply. Those checkboxes are there for the reviewer to see what is this all about and the status of this PR with a quick glance._ --------- Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Signed-off-by: Kjeld Schouten <info@kjeldschouten.nl> Signed-off-by: Kjeld Schouten <kjeld@schouten-lebbing.nl> Co-authored-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
2024-05-30 14:03:23 +00:00
# TODO: Move all website docs structure generation to charttool
2024-06-09 11:09:19 +00:00
IFS='/' read -r -a chart_parts <<<"$item"
./.github/scripts/chart-docs.sh "${chart_parts[1]}/${chart_parts[2]}"
2022-04-01 06:56:49 +00:00
done
2022-04-01 06:34:12 +00:00
- name: Commit Website Changes
run: |
cd website
git config user.name "TrueCharts-Bot"
git config user.email "bot@truecharts.org"
git add --all
git commit -sm "Commit released docs for TrueCharts" || exit 0
git push