Skip to content

Commit

Permalink
Merge pull request #263 from navikt/nais-deploy-v2-uten-apikey
Browse files Browse the repository at this point in the history
Nøkkelfri deploy fra Github
  • Loading branch information
akgagnat authored Feb 12, 2024
2 parents 4450e15 + e6461d2 commit 5585182
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/alert-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,28 @@ jobs:
name: Apply alerts to prod
if: (github.event_name == 'push' && github.ref_name == 'main') || inputs.environment == 'prod'
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: deploy to prod
uses: nais/deploy/actions/deploy@v1
uses: nais/deploy/actions/deploy@v2
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: prod-gcp
RESOURCE: .nais/alerts.yml

apply-alerts-dev:
name: Apply alerts to dev
if: inputs.environment == 'preprod'
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: deploy to dev
uses: nais/deploy/actions/deploy@v1
uses: nais/deploy/actions/deploy@v2
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
CLUSTER: dev-gcp
RESOURCE: .nais/alerts-preprod.yml
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ jobs:
name: Deploy to prod
needs: [build-and-test, build-and-push]
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v1
- uses: nais/deploy/actions/deploy@v2
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
DRY_RUN: false
PRINT_PAYLOAD: true
CLUSTER: prod-gcp
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/preprod-alt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ jobs:
name: Deploy to preprod-alt
needs: [build-and-test, build-and-push]
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v1
- uses: nais/deploy/actions/deploy@v2
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
DRY_RUN: false
PRINT_PAYLOAD: true
CLUSTER: dev-gcp
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/preprod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ jobs:
name: Deploy to preprod
needs: [build-and-test, build-and-push]
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: nais/deploy/actions/deploy@v1
- uses: nais/deploy/actions/deploy@v2
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
DRY_RUN: false
PRINT_PAYLOAD: true
CLUSTER: dev-gcp
Expand Down

0 comments on commit 5585182

Please sign in to comment.