Skip to content

Commit

Permalink
Oppdater nav-dekoratoren-moduler til v2 (#190)
Browse files Browse the repository at this point in the history
* Oppdater alpine-image

* Bump nav-dekoratoren-moduler til v2

* Caps på keyword

* Send reader_token inn i docker-image

* Sett auth_token på en annen måte

* Bump release-action
  • Loading branch information
Mathiamu authored Aug 20, 2024
1 parent 88c00ea commit 1ac9465
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 515 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
contents: write
packages: write
security-events: write # push sarif to github security
id-token: "write"
id-token: write
if: github.ref_name == 'main' || github.event_name == 'workflow_dispatch'
outputs:
image: ${{ steps.docker-build-push.outputs.image }}
Expand Down Expand Up @@ -61,8 +61,9 @@ jobs:
tag: ${{ env.IMAGE_TAG }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
build_secrets: NODE_AUTH_TOKEN=${{ secrets.READER_TOKEN }}
- name: Create release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
name: Release poao-frontend
tag_name: ${{ env.IMAGE_TAG }}
Expand Down
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
FROM node:20-alpine3.19 as builder
FROM node:20-alpine3.20 AS builder

WORKDIR /app

COPY . .

RUN --mount=type=secret,id=NODE_AUTH_TOKEN \
npm config set //npm.pkg.github.com/:_authToken=$(cat /run/secrets/NODE_AUTH_TOKEN)
RUN npm config set @navikt:registry=https://npm.pkg.github.com

RUN npm ci
RUN npm run build

FROM node:20-alpine3.19
FROM node:20-alpine3.20

LABEL org.opencontainers.image.source="https://github.com/navikt/poao-frontend"

Expand Down
Loading

0 comments on commit 1ac9465

Please sign in to comment.