Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gjenoppretter autodeploy, og tar i bruk delte jobber #195

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}