mirror of
https://github.com/truecharts/library-charts.git
synced 2026-07-02 23:47:54 -03:00
**Description** Current common does not support projected volumes. Which we need to mount serviceaccounttokens as files for https://github.com/truecharts/charts/pull/18259 **⚙️ Type of change** - [x] ⚙️ 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 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._
81 lines
2.4 KiB
YAML
81 lines
2.4 KiB
YAML
name: "Charts: Release"
|
|
|
|
concurrency: helm-release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- ".github/**"
|
|
- "library/**"
|
|
|
|
jobs:
|
|
release-charts:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
|
with:
|
|
token: ${{ secrets.BOT_TOKEN }}
|
|
ref: main
|
|
fetch-depth: 0
|
|
|
|
- name: Configure Git
|
|
run: |
|
|
git config user.name "TrueCharts-Bot"
|
|
git config user.email "bot@truecharts.org"
|
|
|
|
- name: Install Helm
|
|
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # tag=v3
|
|
with:
|
|
version: v3.14.1
|
|
|
|
# Optional step if GPG signing is used
|
|
- name: Prepare GPG key
|
|
run: |
|
|
gpg_dir=.cr-gpg
|
|
mkdir "$gpg_dir"
|
|
keyring="$gpg_dir/secring.gpg"
|
|
base64 -d <<< "$GPG_KEYRING_BASE64" > "$keyring"
|
|
passphrase_file="$gpg_dir/passphrase"
|
|
echo "$GPG_PASSPHRASE" > "$passphrase_file"
|
|
echo "CR_PASSPHRASE_FILE=$passphrase_file" >> "$GITHUB_ENV"
|
|
echo "CR_KEYRING=$keyring" >> "$GITHUB_ENV"
|
|
env:
|
|
GPG_KEYRING_BASE64: "${{ secrets.GPG_KEYRING_BASE64 }}"
|
|
GPG_PASSPHRASE: "${{ secrets.GPG_PASSPHRASE }}"
|
|
|
|
- name: Run chart-releaser
|
|
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0
|
|
with:
|
|
charts_dir: library
|
|
config: cr.yaml
|
|
env:
|
|
CR_TOKEN: "${{ secrets.BOT_TOKEN }}"
|
|
CR_SKIP_EXISTING: "true"
|
|
|
|
- name: Helm | Login
|
|
shell: bash
|
|
run: echo ${{ secrets.QUAY_SECRET }} | helm registry login -u ${{ secrets.QUAY_USER }} --password-stdin quay.io
|
|
|
|
|
|
- name: Push Charts to Quay
|
|
shell: bash
|
|
run: |
|
|
for pkg in .cr-release-packages/*.tgz; do
|
|
if [ -z "${pkg:-}" ]; then
|
|
break
|
|
fi
|
|
filename=$(basename "$pkg")
|
|
name="${filename%%-[0-9]*.[0-9]*.[0-9]*.tgz}"
|
|
echo "uploading $name"
|
|
helm push "${pkg}" oci://quay.io/truecharts || echo "failed to upload $pkg to OCI"
|
|
curl -X POST -H "Content-Type: application/json" -d '{"visibility": "public"}' -H "Authorization: Bearer ${{ secrets.QUAY_TOKEN }}" "https://quay.io/api/v1/repository/truecharts/$name/changevisibility" || echo "failed to set $pkg to public on OCI"
|
|
done
|
|
|
|
- name: Helm | Logout
|
|
shell: bash
|
|
run: helm registry logout quay.io
|