ci: test med spesifisering av Dockerfile #165
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
name: Build, push, and deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-deploy: | |
name: Build and push Docker container | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Push docker image to GAR | |
uses: nais/docker-build-push@7971f9fe35c1575d7f13ae9eb4c3e3f0c659d50f | |
id: docker-build-push | |
with: | |
team: the-g-team | |
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} # Provided as Organization Secret | |
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} # Provided as Organization Variable | |
dockerfile: Dockerfile | |
- uses: nais/deploy/actions/deploy@v2 | |
env: | |
CLUSTER: prod-gcp | |
RESOURCE: nais/nais.yaml,nais/alert.yaml | |
VAR: image=${{ steps.docker-build-push.outputs.image }} |