From 963b3027505a7f2e5db53a4b69295802ea416d55 Mon Sep 17 00:00:00 2001 From: Morten Stulen Date: Tue, 15 Aug 2023 09:56:51 +0200 Subject: [PATCH] Legg til permissions --- .github/workflows/build-push.yml | 7 ++++++- .github/workflows/test.yml | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index de178df3..e1b98f79 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -17,14 +17,19 @@ jobs: permissions: contents: "read" id-token: "write" + packages: "read" steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: node-version: '18' - cache: 'npm' + registry-url: https://npm.pkg.github.com + scope: "@navikt" + cache: "npm" - name: Install dependencies run: npm ci + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Set environment variables run: cp environments/${{ inputs.environment }}.env .env - name: Build diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e6d27651..f933c0cf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,6 +10,9 @@ jobs: build-and-test: name: Build and Test runs-on: ubuntu-latest + permissions: + contents: "read" + packages: "read" steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3