Fjernet referanse til loginservice configmap (#411) #323
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: Bygg og deploy master | |
on: | |
push: | |
branches: | |
- "master" | |
env: | |
IMAGE_BASE: ghcr.io/${{ github.repository }}/${{ github.event.repository.name }} | |
IMAGE: ghcr.io/${{ github.repository }}/${{ github.event.repository.name }}:${{ github.sha }} | |
jobs: | |
bygg: | |
name: Bygg | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
actions: write | |
packages: write | |
steps: | |
- name: Sjekk ut kode | |
uses: actions/checkout@v3 | |
- name: Oppsett Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' | |
- name: Bygg og test med Maven | |
run: mvn -f ./pom.xml clean test package | |
- uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
tags: | | |
${{ env.IMAGE }} | |
${{ env.IMAGE_BASE }}:latest | |
cache-from: type=registry,ref=${{ env.IMAGE_BASE }}:latest | |
cache-to: type=inline | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
needs: bygg | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Sjekk ut kode | |
uses: actions/checkout@v3 | |
- name: Deploy til dev-fss | |
uses: nais/deploy/actions/deploy@v1 | |
env: | |
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} | |
CLUSTER: dev-fss | |
RESOURCE: nais/dev-fss.yaml | |
PRINT_PAYLOAD: true | |
REF: ${{ github.sha }} | |
IMAGE: ${{ env.IMAGE }} | |
VAR: altinn_header=${{ secrets.ALTINN_HEADER_DEV }},apigw_header=${{ secrets.APIGW_HEADER_DEV }} | |
- name: Deploy til prod-fss | |
uses: nais/deploy/actions/deploy@v1 | |
env: | |
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} | |
CLUSTER: prod-fss | |
RESOURCE: nais/prod-fss.yaml | |
PRINT_PAYLOAD: true | |
REF: ${{ github.sha }} | |
IMAGE: ${{ env.IMAGE }} | |
VAR: altinn_header=${{ secrets.ALTINN_HEADER_PROD }},apigw_header=${{ secrets.APIGW_HEADER_PROD }} |