0.8.6 #22
Workflow file for this run
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: Publish Release | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
publish-release: | |
if: github.repository_owner == 'telekom-mms' # do not run this elsewhere | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo main-branch, because there is the up-to-date Chart.yaml | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
ref: main | |
- name: Install Helm | |
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4 | |
- name: Get the version tag | |
run: echo "VERSION_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
- name: Package and Release Charts | |
run: | | |
helm package charts/ | |
gh release upload $VERSION_TAG trivy-dojo-report-operator-$VERSION_TAG.tgz | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Checkout Branch gh-pages because that's where the chart-repo exists | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
ref: gh-pages | |
# we do not want to delete the created chart | |
clean: "false" | |
- name: Update index.yaml | |
run: helm repo index . --merge index.yaml --url "https://github.com/telekom-mms/trivy-dojo-report-operator/releases/download/${VERSION_TAG}/" | |
- name: Push Updated index.yaml | |
uses: github-actions-x/commit@722d56b8968bf00ced78407bbe2ead81062d8baa # v2.9 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
push-branch: gh-pages | |
commit-message: Update version to new version | |
force-add: 'true' | |
files: index.yaml | |
name: Deutsche Telekom MMS | |
email: [email protected] | |
- name: Delete old drafts | |
uses: hugo19941994/delete-draft-releases@1bdca1ea7ffb25ae7f468a7bdb40056dae98175e # v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |