Skip to content

Revert "F - Tekstendring omstillingsstønad (665)" #79

Revert "F - Tekstendring omstillingsstønad (665)"

Revert "F - Tekstendring omstillingsstønad (665)" #79

Workflow file for this run

name: Build, push, and deploy
on: push
env:
IMAGE: ghcr.io/${{ github.repository }}:${{ github.sha }}
PRINT_PAYLOAD: true
jobs:
build:
name: Test, build and push
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Docker build and push
uses: actions/checkout@v3
- name: Set up Docker Buildx
if: github.ref == 'refs/heads/main'
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Docker Registry
if: github.ref == 'refs/heads/main'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker build and push
if: github.ref == 'refs/heads/main'
uses: docker/build-push-action@v4
with:
context: .
tags: ${{ env.IMAGE }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
deploy-dev:
name: Deploy to dev
needs: build
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: .nais/naisDev.yml
deploy-prod:
name: Deploy to prod
needs: build
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: prod-gcp
RESOURCE: .nais/naisProd.yml