Logger riktig respons #555
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 master & deploy to dev | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '**.md' | |
- '**.MD' | |
- '.gitignore' | |
- 'LICENSE' | |
- 'CODEOWNERS' | |
- 'docs/**' | |
- 'kafka/**' | |
workflow_dispatch: | |
env: | |
IMAGE_BASE: ghcr.io/${{ github.repository }} | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write # docker | |
contents: write # dep submissions | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: temurin | |
cache: maven | |
- name: Bygge JAR | |
run: mvn clean package --settings ./.m2/settings.xml | |
env: | |
GITHUB_PASSWORD: ${{ secrets.READER_TOKEN }} | |
- name: Sett tag for docker | |
run: echo "TAG=$(date "+%Y.%m.%d")-$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Bygg & last opp Docker image | |
run: | | |
docker build --pull --tag ${IMAGE_BASE}:${TAG} --tag ${IMAGE_BASE}:latest . | |
docker push ${IMAGE_BASE} --all-tags | |
- name: Sett image for nais deploy | |
run: echo "IMAGE=${IMAGE_BASE}:${TAG}" >> $GITHUB_ENV | |
- name: Deploy til preprod | |
uses: nais/deploy/actions/deploy@v1 | |
env: | |
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} | |
CLUSTER: dev-fss | |
RESOURCE: nais/dev-fss.yml | |
- name: Maven Dependency Tree Dependency Submission | |
uses: advanced-security/[email protected] | |
with: | |
settings-file: ./.m2/settings.xml | |
ignore-maven-wrapper: true | |
env: | |
GITHUB_USERNAME: x-access-token | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_PASSWORD: ${{ secrets.READER_TOKEN }} |