Skip to content

Updated fhir pseudonymizer and megalinter to latest (#244) #124

Updated fhir pseudonymizer and megalinter to latest (#244)

Updated fhir pseudonymizer and megalinter to latest (#244) #124

Workflow file for this run

name: Release Charts
on:
push:
branches:
- master
paths:
- "charts/**"
# Declare default permissions as read only.
permissions: read-all
jobs:
release:
runs-on: ubuntu-22.04
container: ghcr.io/chgl/kube-powertools:v2.1.31@sha256:3c0e9cda457f9f6ed3d1ea51a02d54893f53074d98da7469c0da9d28fbbc69b5
permissions:
contents: write
packages: write
id-token: write
steps:
- name: Add workspace as safe directory
run: |
git config --global --add safe.directory /__w/charts/charts
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
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: Add Helm chart dependency repos
run: |
helm repo add codecentric https://codecentric.github.io/helm-charts
helm repo add hapifhir https://hapifhir.github.io/hapi-fhir-jpaserver-starter
- name: Update dependencies
run: find charts/ ! -path charts/ -maxdepth 1 -type d -exec helm dependency update {} \;
- name: Generate changelogs
run: generate-chart-changelog.sh
- name: Run chart-releaser
uses: helm/chart-releaser-action@be16258da8010256c6e82849661221415f031968 # v1.5.0
with:
config: .github/ct/ct.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Login to GitHub Container Registry
run: |
# used by helm
echo "${GHCR_REGISTRY_PASSWORD}" | helm registry login ghcr.io --username ${{ github.actor }} --password-stdin
# used by cosign
echo "${GHCR_REGISTRY_PASSWORD}" | crane auth login ghcr.io --username ${{ github.actor }} --password-stdin
env:
GHCR_REGISTRY_PASSWORD: "${{ secrets.GITHUB_TOKEN }}"
- name: Push Charts to ghcr.io
run: |
for pkg in .cr-release-packages/*; do
if [ -z "${pkg:-}" ]; then
break
fi
helm push "${pkg}" oci://ghcr.io/${{ github.repository }} 2> .digest
OCI_ARTIFACT_PATH="$(awk -F "[, ]+" '/Pushed/{print $NF}' < .digest)"
OCI_ARTIFACT_DIGEST="$(awk -F "[, ]+" '/Digest/{print $NF}' < .digest)"
cosign sign --yes "${OCI_ARTIFACT_PATH}@${OCI_ARTIFACT_DIGEST}"
done