Files
truecharts/.github/workflows/charts-release.yaml
T
Kjeld Schouten-Lebbing 1d51be0e3d 777 on new scripts (+2 squashed commit)
Squashed commit:

[9ae7dd0f] add helm-docs to workflow

[2206f5ba] fix small typo in workflows (+1 squashed commits)

Squashed commits:

[29c2ceb4] Documentation-Cleanup (#181)

* work on readme generation

* document windows setup

* add simple pre-commit install script

* more docs for git setup

* Update pre-commit

* pre-commit automatic fixes

* Increase all patch versions

* Auto Readme and Config doc

* Auto app-readme.md generation

* increase common and common-test versions accordingly (due to cleanup)

* move contribution guidelines to /development in wiki

* fix some end-of-line issues (again)

* fix line 14 of workflows
2021-02-23 18:21:54 +01:00

104 lines
2.7 KiB
YAML

name: "Charts: Release"
on:
push:
branches:
- charts
tags-ignore:
- '**'
paths:
- 'charts/**'
- '!charts/**/*.md'
- '!charts/**/README.md'
- '!charts/**/README.md.gotmpl'
- '!charts/**/app-readme.md'
- '!charts/**/app-readme.md.gotmpl'
- '!charts/**/docs/*'
- 'library/**'
- '!library/**/*.md'
- '!library/**/README.md'
- '!library/**/README.md.gotmpl'
- '!library/**/app-readme.md'
- '!library/**/app-readme.md.gotmpl'
- '!library/**/docs/*'
jobs:
pre-release:
needs: copy
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Block concurrent jobs
uses: softprops/turnstyle@v1
with:
continue-after-seconds: 180
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release:
needs: pre-release
runs-on: ubuntu-latest
steps:
- name: Block concurrent jobs
uses: softprops/turnstyle@v1
with:
continue-after-seconds: 180
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v1
with:
version: v3.5.2
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.2.0
with:
charts_repo_url: https://charts.truecharts.org/
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# Update the generated timestamp in the index.yaml
# needed until https://github.com/helm/chart-releaser/issues/90
# or helm/chart-releaser-action supports this
post-release:
needs: release
runs-on: ubuntu-latest
steps:
- name: Block concurrent jobs
uses: softprops/turnstyle@v1
with:
continue-after-seconds: 180
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v2
with:
ref: "gh-pages"
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Commit and push timestamp updates
run: |
if [[ -f index.yaml ]]; then
git pull
export generated_date=$(date --utc +%FT%T.%9NZ)
sed -i -e "s/^generated:.*/generated: \"$generated_date\"/" index.yaml
git add index.yaml
git commit -sm "Update generated timestamp [ci-skip]" || exit 0
git push
fi