Skip to content

Commit

Permalink
Gjenoppretter autodeploy, og tar i bruk delte jobber
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas-CT committed Aug 16, 2023
1 parent ffdf0db commit 57c9cb2
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/auto-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Autodeployment
run-name: Autodeploy til prod (hver mandag)
on:
schedule:
- cron: '0 08 * * 1' # kl 09 hver mandag

jobs:
build-and-test:
name: Test frontend
uses: ./.github/workflows/test.yml

build-and-push:
name: Build and push Docker container for prod
uses: ./.github/workflows/build-push.yml
with:
environment: prod
secrets: inherit

deploy-prod:
name: Deploy to prod
needs: [build-and-test, build-and-push]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: nais/deploy/actions/deploy@v1
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
DRY_RUN: false
PRINT_PAYLOAD: true
CLUSTER: prod-gcp
RESOURCE: .nais/nais.yml
VAR: app_version=${{ github.sha }},image=${{ needs.build-and-push.outputs.image }}

0 comments on commit 57c9cb2

Please sign in to comment.