Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Bump @babel/traverse from 7.22.8 to 7.23.2 #738

Bump @babel/traverse from 7.22.8 to 7.23.2

Bump @babel/traverse from 7.22.8 to 7.23.2 #738

# This workflow trigger on push to any branch
name: CI / CD
on:
push:
paths-ignore:
- '**.md'
- '.gitignore'
- 'LICENCE'
- 'CODEOWNERS'
env:
IMAGE: ghcr.io/${{ github.repository }}/pleiepenger-i-livets-sluttfase:${{ github.sha }}
jobs:
test:
name: Test Code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: Test code
run: |
npm ci
npm run test
build-code-and-push-docker:
name: Build code and push docker image
if: startsWith(github.ref, 'refs/heads/dev-') || startsWith(github.ref, 'refs/heads/master') || github.event.deployment.payload.triggered # Build and push docker if branch is either master or dev-*
needs: test
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
- name: build code
run: |
npm ci
npm run build
- name: Build Docker image
run: |
docker build --tag ${IMAGE} .
- name: Login to Github Package Registry
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
docker login ghcr.io -u ${GITHUB_REPOSITORY} -p ${GITHUB_TOKEN}
docker push ${IMAGE}
deploy-dev-gcp:
name: Deploy to dev-gcp
if: startsWith(github.ref, 'refs/heads/dev-') || startsWith(github.ref, 'refs/heads/master') # Build and push docker if branch is either master or dev-*
needs: build-code-and-push-docker # Depends on build-code-and-push-docker job
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: nais/naiserator.yml
VARS: nais/dev-gcp.json
deploy-prod-gcp:
name: deploy-prod-gcp
if: startsWith(github.ref, 'refs/heads/master')
needs: build-code-and-push-docker # Depends on build-code-and-push-docker job
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: prod-gcp
RESOURCE: nais/naiserator.yml
VARS: nais/prod-gcp.json