add support for extra hosts in tokendings chart #196
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: Build, push and sign | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- "*.md" | |
env: | |
FEATURE_REPOSITORY: oci://europe-north1-docker.pkg.dev/nais-io/nais/feature | |
jobs: | |
build_push_sign: | |
permissions: | |
contents: "write" | |
id-token: "write" | |
packages: "write" | |
outputs: | |
img_to_deploy: ${{ steps.build-push-sign.outputs.tag }} | |
version: ${{ steps.build-push-sign.outputs.version }} | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # ratchet:actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # ratchet:actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
cache: 'gradle' | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@473878a77f1b98e2b5ac4af93489d1656a80a5ed # ratchet:gradle/actions/setup-gradle@v4 | |
- name: Generate and submit dependency graph | |
uses: gradle/actions/dependency-submission@473878a77f1b98e2b5ac4af93489d1656a80a5ed # ratchet:gradle/actions/dependency-submission@v4 | |
- name: Gradle build | |
run: ./gradlew build | |
- uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # ratchet:sigstore/cosign-installer@v3 | |
- name: Verify distroless base image | |
run: | | |
cosign verify \ | |
--certificate-identity "[email protected]" \ | |
--certificate-oidc-issuer "https://accounts.google.com" \ | |
gcr.io/distroless/java21-debian12:nonroot | |
- name: "Build and push image" | |
uses: nais/platform-build-push-sign@main # ratchet:exclude | |
id: build-push-sign | |
with: | |
name: tokendings | |
google_service_account: gh-tokendings | |
workload_identity_provider: ${{ secrets.NAIS_IO_WORKLOAD_IDENTITY_PROVIDER }} | |
push_ghcr: true | |
multi-platform: true | |
- name: Update values.yaml | |
uses: fjogeleit/yaml-update-action@main | |
with: | |
valueFile: 'charts/values.yaml' | |
propertyPath: 'tokendings.tag' | |
value: ${{ steps.build-push-sign.outputs.version }} | |
commitChange: false | |
- name: Update Chart.yaml | |
uses: fjogeleit/yaml-update-action@main | |
with: | |
valueFile: 'charts/Chart.yaml' | |
propertyPath: 'version' | |
value: ${{ steps.build-push-sign.outputs.version }} | |
commitChange: false | |
- uses: azure/setup-helm@v4 | |
name: "Setup Helm" | |
with: | |
version: "v3.15.1" | |
- name: Build Chart | |
run: |- | |
sed -i "s/^version: .*/version: ${{ steps.build-push-sign.outputs.version }}/g" charts/Chart.yaml | |
helm package charts | |
- name: Push Chart | |
run: |- | |
helm push tokenx*.tgz ${{ env.FEATURE_REPOSITORY }} | |
rollout: | |
needs: | |
- build_push_sign | |
runs-on: fasit-deploy | |
permissions: | |
id-token: write | |
steps: | |
- uses: nais/fasit-deploy@v2 | |
with: | |
chart: ${{ env.FEATURE_REPOSITORY }}/tokenx | |
version: ${{ needs.build_push_sign.outputs.version }} |