chore(paperless-ngx): Bump bitnami/redis to 20.3.0 to support arm64 a… #1148
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 | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
packages: write | |
pages: write | |
id-token: write | |
concurrency: | |
group: release | |
cancel-in-progress: false | |
jobs: | |
release-charts: | |
name: Release Charts | |
runs-on: ubuntu-latest | |
env: | |
AUTHOR_USER: chart-bot | |
AUTHOR_EMAIL: 160046936+charts-bot[bot]@users.noreply.github.com | |
steps: | |
- name: Generate Token | |
id: app-token | |
uses: actions/create-github-app-token@v1 | |
with: | |
app-id: ${{ secrets.BOT_APP_ID }} | |
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Configure Git | |
run: | | |
git config user.name "${{ env.AUTHOR_USER }}" | |
git config user.email "${{ env.AUTHOR_EMAIL }}" | |
- name: Add Helm repos | |
run: | | |
helm repo add bitnami https://charts.bitnami.com/bitnami | |
helm repo add bjw-s https://bjw-s.github.io/helm-charts | |
- name: Remove readme images | |
run: | | |
set -x | |
for f in charts/**/README.md; do | |
sed -i '/^<img .* alt=".* logo"/,+1d' "$f" | |
done | |
- name: Install chart-releaser | |
uses: helm/[email protected] | |
with: | |
install_only: true | |
- name: Package charts | |
id: package_charts | |
run: | | |
changed_charts="" | |
for dir in charts/*; do | |
chart_name="$(basename "$dir")" | |
version="$(yq '.version' "$dir/Chart.yaml")" | |
if ! git rev-parse "$chart_name-${version#v}" &>/dev/null; then | |
echo "Packaging chart $chart_name..." | |
cr package --package-path=.cr-release-packages "$dir" | |
changed_charts+="$chart_name," | |
fi | |
done | |
echo "changed_charts=${changed_charts%,}" >> $GITHUB_OUTPUT | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
if: steps.package_charts.outputs.changed_charts != '' | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ github.token }} | |
- name: Push charts to GHCR | |
if: steps.package_charts.outputs.changed_charts != '' | |
run: | | |
for pkg in .cr-release-packages/*; do | |
if [ -z "${pkg:-}" ]; then | |
break | |
fi | |
echo "Pushing $pkg..." | |
helm push "$pkg" "oci://ghcr.io/$GITHUB_REPOSITORY_OWNER/charts" | |
done | |
- name: Publish charts | |
uses: helm/[email protected] | |
if: steps.package_charts.outputs.changed_charts != '' | |
with: | |
skip_packaging: true | |
env: | |
CR_TOKEN: ${{ steps.app-token.outputs.token }} | |
CR_PAGES_BRANCH: helm-index | |
build-docs: | |
name: Build Docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
cache: pip | |
cache-dependency-path: docs/requirements.txt | |
- name: MkDocs cache | |
uses: actions/cache@v4 | |
with: | |
path: docs/.cache | |
key: ${{ runner.os }}-mkdocs-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-mkdocs- | |
- name: Install dependencies | |
run: pip install -r docs/requirements.txt | |
- name: Build docs | |
working-directory: docs | |
env: | |
REPO_NAME: ${{ github.repository }} | |
REPO_URL: ${{ github.server_url }}/${{ github.repository }} | |
run: mkdocs build | |
- name: Compress | |
run: tar -czvf docs.tar.gz -C docs site | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: docs.tar.gz | |
deploy-site: | |
name: Deploy Site | |
runs-on: ubuntu-latest | |
needs: [release-charts, build-docs] | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Checkout Helm index | |
uses: actions/checkout@v4 | |
with: | |
path: helm-index | |
ref: refs/heads/helm-index | |
- name: Download docs artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: docs | |
- name: Decompress docs | |
run: tar -xzvf docs.tar.gz | |
- name: Move Helm index to docs | |
run: mv helm-index/* site | |
- name: Upload release artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: site | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |