Fjernet mulighet for å opprette avtaler som skal overføres fra Arena … #765
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: Bygg og deploy master | |
on: | |
push: | |
branches: | |
- 'master' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_REPOSITORY: ${{ github.repository }} | |
IMAGE: ghcr.io/${{ github.repository }}/tiltaksgjennomforing:${{ github.sha }} | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
jobs: | |
bygg: | |
permissions: | |
packages: write | |
name: Bygg | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Sjekk ut kode | |
uses: actions/checkout@v3 | |
- name: Setup node.js | |
uses: actions/setup-node@v3 | |
with: | |
registry-url: 'https://npm.pkg.github.com' | |
- name: Install | |
run: npm ci | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }} | |
- name: Server install | |
working-directory: ./server | |
run: npm ci | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }} | |
- name: Typescript | |
run: npm run ts | |
- name: Prettier | |
run: npm run prettier | |
- name: Kjør tester | |
run: npm run test | |
- name: Build | |
run: npm run build | |
- name: Server build | |
working-directory: ./server | |
run: npm run build | |
- name: Sentry release | |
run: npm run release | |
- name: Fjerne source maps | |
run: | | |
rm dist/client/assets/*.map | |
- name: Bygg, tag og push Docker-image | |
run: | | |
echo ${GITHUB_TOKEN} | docker login ghcr.io -u ${GITHUB_REPOSITORY} --password-stdin | |
docker build --tag ${IMAGE} . | |
docker push ${IMAGE} | |
deploy-prod-gcp-intern: | |
name: Deploy til prod-gcp intern | |
runs-on: ubuntu-20.04 | |
needs: bygg | |
steps: | |
- name: Sjekk ut kode | |
uses: actions/checkout@v3 | |
- name: Deploy til prod-gcp intern | |
uses: nais/deploy/actions/deploy@v1 | |
env: | |
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} | |
CLUSTER: prod-gcp | |
RESOURCE: nais/nais-gcp-intern.yaml | |
PRINT_PAYLOAD: true | |
VARS: nais/prod-gcp-intern.yaml | |
deploy-prod-gcp-ekstern: | |
name: Deploy til prod-gcp ekstern | |
runs-on: ubuntu-20.04 | |
needs: bygg | |
steps: | |
- name: Sjekk ut kode | |
uses: actions/checkout@v3 | |
- name: Deploy til prod-gcp ekstern | |
uses: nais/deploy/actions/deploy@v1 | |
env: | |
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} | |
CLUSTER: prod-gcp | |
RESOURCE: nais/nais-gcp-ekstern.yaml | |
PRINT_PAYLOAD: true | |
VARS: nais/prod-gcp-ekstern.yaml | |
deploy-dev-gcp-intern: | |
name: Deploy til dev-gcp intern | |
runs-on: ubuntu-20.04 | |
needs: bygg | |
steps: | |
- name: Sjekk ut kode | |
uses: actions/checkout@v3 | |
- name: Deploy til dev-gcp intern | |
uses: nais/deploy/actions/deploy@v1 | |
env: | |
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} | |
CLUSTER: dev-gcp | |
RESOURCE: nais/nais-gcp-intern.yaml | |
PRINT_PAYLOAD: true | |
VARS: nais/dev-gcp-intern.yaml | |
deploy-dev-gcp-ekstern: | |
name: Deploy til dev-gcp ekstern | |
runs-on: ubuntu-20.04 | |
needs: bygg | |
steps: | |
- name: Sjekk ut kode | |
uses: actions/checkout@v3 | |
- name: Deploy til dev-gcp ekstern | |
uses: nais/deploy/actions/deploy@v1 | |
env: | |
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} | |
CLUSTER: dev-gcp | |
RESOURCE: nais/nais-gcp-ekstern.yaml | |
PRINT_PAYLOAD: true | |
VARS: nais/dev-gcp-ekstern.yaml | |
deploy-dev-gcp-labs: | |
name: Deploy til dev-gcp (labs) | |
runs-on: ubuntu-20.04 | |
needs: bygg | |
steps: | |
- name: Sjekk ut kode | |
uses: actions/checkout@v3 | |
- name: Deploy til dev-gcp | |
uses: nais/deploy/actions/deploy@v1 | |
env: | |
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} | |
CLUSTER: dev-gcp | |
RESOURCE: nais/dev-gcp-labs.yaml | |
PRINT_PAYLOAD: true | |
VARS: nais/dev-gcp-labs.json |