Skip to content

chore(deps): update container image mikenye/tar1090 to latest@1c0fbeb… #79

chore(deps): update container image mikenye/tar1090 to latest@1c0fbeb…

chore(deps): update container image mikenye/tar1090 to latest@1c0fbeb… #79

name: "Charts: Release"
concurrency: helm-release
on:
workflow_dispatch:
push:
branches:
- master
paths:
- "charts/**"
jobs:
release-helm:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
token: ${{ secrets.BOT_TOKEN }}
fetch-depth: 1
- name: Checkout Helm-Staging
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
fetch-depth: 1
repository: truecharts/helm-staging
token: ${{ secrets.BOT_TOKEN }}
path: helm
- name: Install pre-commit, yamale and yamllint
run: |
pip3 install --no-cache-dir pre-commit
- 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
# Optional step if GPG signing is used
- name: Clean Questions
shell: bash
run: |
find ./helm -type f -name 'questions.yaml' -exec rm {} \;
- name: Commit Helm Changes
run: |
rm -rf helm/charts
mkdir helm/charts
cp -rf charts helm
- name: Commit Helm Changes
run: |
cd helm
git config user.name "TrueCharts-Bot"
git config user.email "[email protected]"
git add --all
git commit -sm "Commit released Helm Charts for TrueCharts" || exit 0
git push
cd -
release-scale:
runs-on: ubuntu-latest
outputs:
ref: ${{ steps.save-commit-hash.outputs.commit_hash }}
steps:
- name: Install Kubernetes tools
uses: yokawasa/action-setup-kube-tools@5fe385031665158529decddddb51d6224422836e # v0.11.1
with:
setup-tools: |
helmv3
helm: "3.14.0"
- name: Prep go-yq
run: |
wget https://github.com/mikefarah/yq/releases/download/v4.44.1/yq_linux_amd64 -O /usr/local/bin/go-yq && chmod +x /usr/local/bin/go-yq
# Optional step if GPG signing is used
- name: Prepare GPG key
shell: bash
run: |
gpg_dir=.cr-gpg
mkdir -p "$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: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
token: ${{ secrets.BOT_TOKEN }}
fetch-depth: 0
- name: Prep Helm
shell: bash
run: |
./.github/scripts/prep_helm.sh
- name: Setting repo parent dir as safe safe.directory
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Collect changes
id: collect-changes
uses: ./.github/actions/collect-changes
- name: Generate Changelog
shell: bash
if: |
steps.collect-changes.outputs.changesDetectedAfterTag == 'true'
run: |
export GOBIN=/usr/local/bin/
go install github.com/git-chglog/git-chglog/cmd/git-chglog@latest
CHARTS=(${{ steps.collect-changes.outputs.modifiedChartsAfterTag }})
parthreads=$(($(nproc) * 2))
parallel -j ${parthreads} .github/scripts/changelog.sh '2>&1' ::: ${CHARTS[@]}
- name: Fix Pre-Commit issues
shell: bash
if: |
steps.collect-changes.outputs.changesDetectedAfterTag == 'true'
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
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
if: |
steps.collect-changes.outputs.changesDetectedAfterTag == 'true'
with:
fetch-depth: 1
repository: truecharts/website
token: ${{ secrets.BOT_TOKEN }}
path: website
- name: Copy docs to website
if: |
steps.collect-changes.outputs.changesDetectedAfterTag == 'true'
shell: bash
run: |
#!/bin/bash
CHARTS=(${{ steps.collect-changes.outputs.modifiedChartsAfterTag }})
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..."
export DEBUG=false
export STRICT=true
go-yq --version
for i in "${CHARTS[@]}"
do
./.github/scripts/chart-docs.sh "$i"
done
- name: Commit Website Changes
if: |
steps.collect-changes.outputs.changesDetected == 'true'
run: |
cd website
git config user.name "TrueCharts-Bot"
git config user.email "[email protected]"
git add --all
git commit -sm "Commit released docs for TrueCharts" || exit 0
git push
- name: Checkout Catalog
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
if: |
steps.collect-changes.outputs.changesDetectedAfterTag == 'true'
with:
fetch-depth: 1
repository: truecharts/catalog
token: ${{ secrets.BOT_TOKEN }}
ref: staging
path: catalog
- name: build catalog
shell: bash
if: |
steps.collect-changes.outputs.changesDetectedAfterTag == 'true'
run: |
CHARTS=(${{ steps.collect-changes.outputs.modifiedChartsAfterTag }})
./charttool deps
./charttool buildSCALE
- name: Commit Catalog
if: |
steps.collect-changes.outputs.changesDetected == 'true'
run: |
cd catalog
git config user.name "TrueCharts-Bot"
git config user.email "[email protected]"
git add --all
git commit -sm "Commit new Chart releases for TrueCharts" || exit 0
git push
cd -