Skip to content

Refactor log queries to include environment and application names in … #509

Refactor log queries to include environment and application names in …

Refactor log queries to include environment and application names in … #509

Workflow file for this run

name: Build and push image and chart
on:
push:
branches:
- main
- refactor_migration
env:
NAME: console-frontend
IMAGE_REPOSITORY: oci://europe-north1-docker.pkg.dev/nais-io/nais
jobs:
build_push:
outputs:
version: ${{ steps.build-push-sign.outputs.version }}
permissions:
contents: 'read'
id-token: 'write'
name: Build and push
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # ratchet:actions/checkout@v3
- name: npm run check
run: |-
npm install && npm run build && npm run check
- uses: nais/platform-build-push-sign@main # ratchet:nais/platform-build-push-sign@main
id: build-push-sign
with:
name: ${{ env.NAME }}
google_service_account: gh-${{ env.NAME }}
workload_identity_provider: ${{ secrets.NAIS_IO_WORKLOAD_IDENTITY_PROVIDER }}
push: true
- uses: azure/setup-helm@18bc76811624f360dbd7f18c2d4ecb32c7b87bab # ratchet:azure/setup-helm@v1
name: 'Setup Helm'
with:
version: '3.8.0'
- name: Build Chart
run: |-
sed -i "s/^version: .*/version: ${{ steps.build-push-sign.outputs.version }}/g" charts/Chart.yaml
cat charts/Chart.yaml
helm package charts
- name: Push Chart
run: |-
helm push ${{ env.NAME }}*.tgz ${{ env.IMAGE_REPOSITORY }}
rollout:
needs:
- build_push
# Only do this if on main
if: endsWith(github.ref, '/main')
runs-on: fasit-deploy
permissions:
id-token: write
steps:
- uses: nais/fasit-deploy@v2
with:
chart: ${{ env.IMAGE_REPOSITORY }}/${{ env.NAME }}
version: ${{ needs.build_push.outputs.version }}