-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: temporary workflow deploy to staging catalog-portal
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
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
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 }} |