v1.3.1: Create Helm Chart for EJBCA External Issuer for cert-manager and tidy up permissions #1
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: helm_release | |
on: | |
pull_request: | |
branches: | |
- 'v*' | |
types: | |
- closed | |
jobs: | |
helm: | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.merged == true | |
steps: | |
- name: Extract Version Tag | |
id: extract_version | |
run: /bin/bash -c 'echo ::set-output name=VERSION::$(echo ${GITHUB_REF##*/} | cut -c2-)' | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Change version and appVersion in Chart.yaml to the tag in the closed PR | |
- name: Update Helm App/Chart Version | |
shell: bash | |
run: | | |
sed -i "s/^version: .*/version: ${{ steps.extract_version.outputs.VERSION }}/g" deploy/charts/ejbca-cert-manager-issuer/Chart.yaml | |
sed -i "s/^appVersion: .*/appVersion: \"${{ steps.extract_version.outputs.VERSION }}\"/g" deploy/charts/ejbca-cert-manager-issuer/Chart.yaml | |
- 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@v3 | |
- name: Run chart-releaser | |
uses: helm/chart-releaser-action@v1.5.0 | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
with: | |
pages_branch: gh-pages | |
charts_dir: deploy/charts | |
mark_as_latest: true | |
packages_with_index: true |