Skip to content

Støtt navn og telefonnummer på arbeidsgiver fra Simba #192

Støtt navn og telefonnummer på arbeidsgiver fra Simba

Støtt navn og telefonnummer på arbeidsgiver fra Simba #192

Workflow file for this run

name: Produksjon
on:
release:
types: [released]
env:
IMAGE: ghcr.io/${{ github.repository }}/syfoinntektsmelding:${{ github.sha }}
jobs:
# Label of the container job
build:
# You must use a Linux environment when using service containers or container jobs
runs-on: ubuntu-latest
permissions:
packages: write
# Service containers to run with `container-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '17'
- name: Cache Gradle wrapper
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-wrapper-
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-cache-${{ hashFiles('build.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-cache-
- name: test and build
run: ./gradlew test build
env:
ORG_GRADLE_PROJECT_githubUser: x-access-token
ORG_GRADLE_PROJECT_githubPassword: ${{ secrets.GITHUB_TOKEN }}
- name: Login to GitHub Packages Docker Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and publish Docker image
run: |
docker build --tag ${IMAGE} .
docker push ${IMAGE}
deploy:
name: Deploy to PROD
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: prod-fss
RESOURCE: deploy/prod.yaml