Skip to content

Commit

Permalink
chore: temporary workflow deploy to staging catalog-portal
Browse files Browse the repository at this point in the history
  • Loading branch information
hegeaal committed Jan 22, 2025
1 parent 43f0c02 commit cb176aa
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/hege-deploy-staging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy to staging

on:
pull_request:
types: [ready_for_review, opened, reopened, synchronize]
branches:
- main

jobs:
test:
name: Test and build
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
fetch-depth: 0
- name: Caching Dist Folder
uses: actions/cache@v4
with:
path: ./dist
key: cache-dist-${{ github.sha }}

build:
name: Build affected apps when pull request is created
needs: [test]
uses: Informasjonsforvaltning/workflows/.github/workflows/build-push.yaml@main
with:
app_name: catalog-portal-frontend
monorepo_app: true
environment: staging
build_env: true
build_env_name: BINARY
build_env_value: catalog-portal-frontend
dockerfile: apps/catalog-portal/Dockerfile
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

deploy:
name: Deploy affected apps to staging environment with reusable workflow
needs: [test, build]
uses: Informasjonsforvaltning/workflows/.github/workflows/kustomize-deploy.yaml@main
with:
app_name: catalog-portal-frontend
environment: staging
monorepo_app: true
cluster: digdir-fdk-dev
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DIGDIR_FDK_AUTODEPLOY: ${{ secrets.DIGDIR_FDK_DEV_AUTODEPLOY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 comments on commit cb176aa

Please sign in to comment.