Skip to content

Commit 45bb8c1

Browse files
committed
fjernet prettierignore
1 parent c28267d commit 45bb8c1

File tree

5 files changed

+172
-172
lines changed

5 files changed

+172
-172
lines changed

.github/workflows/build-image.yml

+71-71
Original file line numberDiff line numberDiff line change
@@ -63,74 +63,74 @@ on:
6363
value: ${{ jobs.build_image.outputs.image }}
6464

6565
jobs:
66-
build_image:
67-
name: Build docker image
68-
runs-on: ubuntu-latest
69-
permissions:
70-
contents: read
71-
id-token: write
72-
environment: ${{ inputs.environment }}
73-
outputs:
74-
image: ${{ steps.docker-push.outputs.image }}
75-
steps:
76-
- name: Checkout repo
77-
uses: actions/checkout@v4
78-
- name: Setup node.js
79-
uses: actions/setup-node@v4
80-
with:
81-
node-version: 20
82-
registry-url: 'https://npm.pkg.github.com'
83-
cache: 'npm'
84-
- name: Set app environmment
85-
run: |
86-
cat > .env <<EOF
87-
ENV=${{ inputs.ENV }}
88-
NODE_ENV=${{ inputs.NODE_ENV }}
89-
ADMIN_ORIGIN=${{ inputs.ADMIN_ORIGIN }}
90-
APP_ORIGIN=${{ inputs.APP_ORIGIN }}
91-
DECORATOR_URL=${{ inputs.DECORATOR_URL }}
92-
XP_ORIGIN=${{ inputs.XP_ORIGIN }}
93-
TELEMETRY_URL=${{ inputs.TELEMETRY_URL }}
94-
REVALIDATOR_PROXY_ORIGIN=${{ inputs.REVALIDATOR_PROXY_ORIGIN }}
95-
FAILOVER_ORIGIN=${{ inputs.FAILOVER_ORIGIN }}
96-
IS_FAILOVER_INSTANCE=${{ inputs.IS_FAILOVER_INSTANCE }}
97-
INNLOGGINGSSTATUS_URL=${{ inputs.INNLOGGINGSSTATUS_URL }}
98-
NAVNO_SEARCH_API_URL=${{ inputs.NAVNO_SEARCH_API_URL }}
99-
MELDEKORT_API_URL=${{ inputs.MELDEKORT_API_URL }}
100-
ASSET_PREFIX=https://cdn.nav.no/personbruker/nav-enonicxp-frontend
101-
IMAGE_CACHE_DIR=/tmp/images
102-
NEXT_TELEMETRY_DISABLED=1
103-
EOF
104-
- name: Nextjs cache
105-
uses: actions/cache@v4
106-
with:
107-
path: ${{ github.workspace }}/.next/cache
108-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}
109-
- name: Install dependencies
110-
run: npm ci
111-
env:
112-
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
113-
- name: Run linting
114-
run: npm run lint
115-
- name: Run tests
116-
run: npm run test
117-
- name: Build application
118-
run: npm run build
119-
env:
120-
SERVICE_SECRET: ${{ secrets.SERVICE_SECRET }}
121-
- name: Upload static files to Nav CDN
122-
uses: nais/deploy/actions/cdn-upload/v2@master
123-
with:
124-
team: personbruker
125-
source: ./.next/static
126-
destination: nav-enonicxp-frontend/_next
127-
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
128-
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
129-
- name: Build and push docker image
130-
uses: nais/docker-build-push@v0
131-
id: docker-push
132-
with:
133-
team: personbruker
134-
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
135-
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
136-
image_suffix: ${{ inputs.imagename }}
66+
build_image:
67+
name: Build docker image
68+
runs-on: ubuntu-latest
69+
permissions:
70+
contents: read
71+
id-token: write
72+
environment: ${{ inputs.environment }}
73+
outputs:
74+
image: ${{ steps.docker-push.outputs.image }}
75+
steps:
76+
- name: Checkout repo
77+
uses: actions/checkout@v4
78+
- name: Setup node.js
79+
uses: actions/setup-node@v4
80+
with:
81+
node-version: 20
82+
registry-url: 'https://npm.pkg.github.com'
83+
cache: 'npm'
84+
- name: Set app environmment
85+
run: |
86+
cat > .env <<EOF
87+
ENV=${{ inputs.ENV }}
88+
NODE_ENV=${{ inputs.NODE_ENV }}
89+
ADMIN_ORIGIN=${{ inputs.ADMIN_ORIGIN }}
90+
APP_ORIGIN=${{ inputs.APP_ORIGIN }}
91+
DECORATOR_URL=${{ inputs.DECORATOR_URL }}
92+
XP_ORIGIN=${{ inputs.XP_ORIGIN }}
93+
TELEMETRY_URL=${{ inputs.TELEMETRY_URL }}
94+
REVALIDATOR_PROXY_ORIGIN=${{ inputs.REVALIDATOR_PROXY_ORIGIN }}
95+
FAILOVER_ORIGIN=${{ inputs.FAILOVER_ORIGIN }}
96+
IS_FAILOVER_INSTANCE=${{ inputs.IS_FAILOVER_INSTANCE }}
97+
INNLOGGINGSSTATUS_URL=${{ inputs.INNLOGGINGSSTATUS_URL }}
98+
NAVNO_SEARCH_API_URL=${{ inputs.NAVNO_SEARCH_API_URL }}
99+
MELDEKORT_API_URL=${{ inputs.MELDEKORT_API_URL }}
100+
ASSET_PREFIX=https://cdn.nav.no/personbruker/nav-enonicxp-frontend
101+
IMAGE_CACHE_DIR=/tmp/images
102+
NEXT_TELEMETRY_DISABLED=1
103+
EOF
104+
- name: Nextjs cache
105+
uses: actions/cache@v4
106+
with:
107+
path: ${{ github.workspace }}/.next/cache
108+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}
109+
- name: Install dependencies
110+
run: npm ci
111+
env:
112+
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}
113+
- name: Run linting
114+
run: npm run lint
115+
- name: Run tests
116+
run: npm run test
117+
- name: Build application
118+
run: npm run build
119+
env:
120+
SERVICE_SECRET: ${{ secrets.SERVICE_SECRET }}
121+
- name: Upload static files to Nav CDN
122+
uses: nais/deploy/actions/cdn-upload/v2@master
123+
with:
124+
team: personbruker
125+
source: ./.next/static
126+
destination: nav-enonicxp-frontend/_next
127+
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
128+
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
129+
- name: Build and push docker image
130+
uses: nais/docker-build-push@v0
131+
id: docker-push
132+
with:
133+
team: personbruker
134+
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
135+
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
136+
image_suffix: ${{ inputs.imagename }}

.github/workflows/deploy-failover.dev.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ on:
1616
- dev2
1717

1818
jobs:
19-
deploy:
20-
uses: ./.github/workflows/deploy-to-nais.yml
21-
permissions:
22-
id-token: write
23-
with:
24-
image: ghcr.io/${{ github.repository }}:${{ github.event.inputs.image_name }}
25-
cluster: dev-gcp
26-
vars_file: vars-${{ github.event.inputs.app_env }}-failover.yml
27-
config_file: config-failover.yml
19+
deploy:
20+
uses: ./.github/workflows/deploy-to-nais.yml
21+
permissions:
22+
id-token: write
23+
with:
24+
image: ghcr.io/${{ github.repository }}:${{ github.event.inputs.image_name }}
25+
cluster: dev-gcp
26+
vars_file: vars-${{ github.event.inputs.app_env }}-failover.yml
27+
config_file: config-failover.yml

.github/workflows/deploy-failover.prod.yml

+36-36
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,39 @@ on:
55
workflow_dispatch:
66

77
jobs:
8-
build:
9-
uses: ./.github/workflows/build-image.yml
10-
permissions:
11-
contents: read
12-
id-token: write
13-
with:
14-
environment: prod-gcp:failover
15-
imagename: failover-prod
16-
ENV: prod
17-
ADMIN_ORIGIN: https://portal-admin.oera.no
18-
APP_ORIGIN: https://www.nav.no
19-
REVALIDATOR_PROXY_ORIGIN: http://nav-enonicxp-frontend-revalidator-proxy
20-
DECORATOR_URL: https://www.nav.no/dekoratoren
21-
XP_ORIGIN: https://www.nav.no
22-
TELEMETRY_URL: https://telemetry.nav.no/collect
23-
MELDEKORT_API_URL: https://meldekort-api.nav.no/meldekort/meldekort-api/api/person
24-
INNLOGGINGSSTATUS_URL: https://www.nav.no/person/nav-dekoratoren-api/auth
25-
NAVNO_SEARCH_API_URL: https://navno-search-api.nav.no/content/search-url
26-
FAILOVER_ORIGIN: https://www-failover.nav.no
27-
IS_FAILOVER_INSTANCE: true
28-
NODE_ENV: production
29-
secrets:
30-
READER_TOKEN: ${{ secrets.READER_TOKEN }}
31-
SERVICE_SECRET: ${{ secrets.SERVICE_SECRET }}
32-
NAIS_WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
33-
deploy:
34-
uses: ./.github/workflows/deploy-to-nais.yml
35-
needs: build
36-
permissions:
37-
id-token: write
38-
with:
39-
image: ${{ needs.build.outputs.image }}
40-
cluster: prod-gcp
41-
vars_file: vars-prod-failover.yml
42-
config_file: config-failover.yml
43-
hpa_file: hpa-prod-failover.yml
8+
build:
9+
uses: ./.github/workflows/build-image.yml
10+
permissions:
11+
contents: read
12+
id-token: write
13+
with:
14+
environment: prod-gcp:failover
15+
imagename: failover-prod
16+
ENV: prod
17+
ADMIN_ORIGIN: https://portal-admin.oera.no
18+
APP_ORIGIN: https://www.nav.no
19+
REVALIDATOR_PROXY_ORIGIN: http://nav-enonicxp-frontend-revalidator-proxy
20+
DECORATOR_URL: https://www.nav.no/dekoratoren
21+
XP_ORIGIN: https://www.nav.no
22+
TELEMETRY_URL: https://telemetry.nav.no/collect
23+
MELDEKORT_API_URL: https://meldekort-api.nav.no/meldekort/meldekort-api/api/person
24+
INNLOGGINGSSTATUS_URL: https://www.nav.no/person/nav-dekoratoren-api/auth
25+
NAVNO_SEARCH_API_URL: https://navno-search-api.nav.no/content/search-url
26+
FAILOVER_ORIGIN: https://www-failover.nav.no
27+
IS_FAILOVER_INSTANCE: true
28+
NODE_ENV: production
29+
secrets:
30+
READER_TOKEN: ${{ secrets.READER_TOKEN }}
31+
SERVICE_SECRET: ${{ secrets.SERVICE_SECRET }}
32+
NAIS_WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
33+
deploy:
34+
uses: ./.github/workflows/deploy-to-nais.yml
35+
needs: build
36+
permissions:
37+
id-token: write
38+
with:
39+
image: ${{ needs.build.outputs.image }}
40+
cluster: prod-gcp
41+
vars_file: vars-prod-failover.yml
42+
config_file: config-failover.yml
43+
hpa_file: hpa-prod-failover.yml

.github/workflows/deploy.dev1.yml

+37-37
Original file line numberDiff line numberDiff line change
@@ -12,40 +12,40 @@ on:
1212
- development
1313

1414
jobs:
15-
build:
16-
uses: ./.github/workflows/build-image.yml
17-
permissions:
18-
contents: read
19-
id-token: write
20-
with:
21-
environment: dev-gcp:dev1
22-
imagename: dev1-deploy
23-
ENV: dev1
24-
ADMIN_ORIGIN: https://portal-admin-dev.oera.no
25-
APP_ORIGIN: https://www.ansatt.dev.nav.no
26-
REVALIDATOR_PROXY_ORIGIN: http://nav-enonicxp-frontend-revalidator-proxy-dev1
27-
DECORATOR_URL: https://dekoratoren.ekstern.dev.nav.no
28-
XP_ORIGIN: https://www.dev.nav.no
29-
TELEMETRY_URL: https://telemetry.ekstern.dev.nav.no/collect
30-
INNLOGGINGSSTATUS_URL: https://www.ekstern.dev.nav.no/person/nav-dekoratoren-api/auth
31-
RELEASE_TAG: dev1-${{ github.sha }}
32-
NAVNO_SEARCH_API_URL: https://navno-search-api.ekstern.dev.nav.no/content/search-url
33-
MELDEKORT_API_URL: https://meldekort-api-q1.intern.dev.nav.no/meldekort/meldekort-api/api/person
34-
FAILOVER_ORIGIN: https://www-failover.intern.dev.nav.no
35-
NODE_ENV: ${{ inputs.NODE_ENV }}
36-
secrets:
37-
READER_TOKEN: ${{ secrets.READER_TOKEN }}
38-
SERVICE_SECRET: ${{ secrets.SERVICE_SECRET }}
39-
NAIS_WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
40-
deploy:
41-
uses: ./.github/workflows/deploy-to-nais.yml
42-
needs: build
43-
permissions:
44-
id-token: write
45-
with:
46-
image: ${{ needs.build.outputs.image }}
47-
cluster: dev-gcp
48-
vars_file: vars-dev1.yml
49-
config_file: config.yml
50-
hpa_file: hpa-dev1.yml
51-
deploy_valkey: true
15+
build:
16+
uses: ./.github/workflows/build-image.yml
17+
permissions:
18+
contents: read
19+
id-token: write
20+
with:
21+
environment: dev-gcp:dev1
22+
imagename: dev1-deploy
23+
ENV: dev1
24+
ADMIN_ORIGIN: https://portal-admin-dev.oera.no
25+
APP_ORIGIN: https://www.ansatt.dev.nav.no
26+
REVALIDATOR_PROXY_ORIGIN: http://nav-enonicxp-frontend-revalidator-proxy-dev1
27+
DECORATOR_URL: https://dekoratoren.ekstern.dev.nav.no
28+
XP_ORIGIN: https://www.dev.nav.no
29+
TELEMETRY_URL: https://telemetry.ekstern.dev.nav.no/collect
30+
INNLOGGINGSSTATUS_URL: https://www.ekstern.dev.nav.no/person/nav-dekoratoren-api/auth
31+
RELEASE_TAG: dev1-${{ github.sha }}
32+
NAVNO_SEARCH_API_URL: https://navno-search-api.ekstern.dev.nav.no/content/search-url
33+
MELDEKORT_API_URL: https://meldekort-api-q1.intern.dev.nav.no/meldekort/meldekort-api/api/person
34+
FAILOVER_ORIGIN: https://www-failover.intern.dev.nav.no
35+
NODE_ENV: ${{ inputs.NODE_ENV }}
36+
secrets:
37+
READER_TOKEN: ${{ secrets.READER_TOKEN }}
38+
SERVICE_SECRET: ${{ secrets.SERVICE_SECRET }}
39+
NAIS_WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
40+
deploy:
41+
uses: ./.github/workflows/deploy-to-nais.yml
42+
needs: build
43+
permissions:
44+
id-token: write
45+
with:
46+
image: ${{ needs.build.outputs.image }}
47+
cluster: dev-gcp
48+
vars_file: vars-dev1.yml
49+
config_file: config.yml
50+
hpa_file: hpa-dev1.yml
51+
deploy-valkey: true

.github/workflows/deploy.prod.yml

+19-19
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,22 @@ jobs:
4343
hpa_file: hpa-prod.yml
4444
deploy_valkey: true
4545

46-
release:
47-
name: Create a new release
48-
needs: deploy
49-
runs-on: ubuntu-latest
50-
permissions:
51-
contents: write
52-
id-token: write
53-
steps:
54-
- name: Generate unique tag name
55-
run: echo "TAG_NAME=$(date +%s)" >> $GITHUB_ENV
56-
- name: Create GitHub Release
57-
uses: softprops/action-gh-release@v2
58-
with:
59-
target_commitish: main
60-
tag_name: release/prod@${{ env.TAG_NAME }} # Generates a unique tag using timestamp
61-
name: Release ${{ github.ref_name }}
62-
generate_release_notes: true
63-
env:
64-
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} # This is a PAT with repo permissions
46+
release:
47+
name: Create a new release
48+
needs: deploy
49+
runs-on: ubuntu-latest
50+
permissions:
51+
contents: write
52+
id-token: write
53+
steps:
54+
- name: Generate unique tag name
55+
run: echo "TAG_NAME=$(date +%s)" >> $GITHUB_ENV
56+
- name: Create GitHub Release
57+
uses: softprops/action-gh-release@v2
58+
with:
59+
target_commitish: main
60+
tag_name: release/prod@${{ env.TAG_NAME }} # Generates a unique tag using timestamp
61+
name: Release ${{ github.ref_name }}
62+
generate_release_notes: true
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} # This is a PAT with repo permissions

0 commit comments

Comments
 (0)