Build and deploy #1
This file contains hidden or 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 and deploy | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build_and_deploy: | |
| name: Build, push and deploy | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Build and push image and SBOM to OCI registry | |
| uses: nais/docker-build-push@v0 | |
| id: docker-build-push | |
| with: | |
| team: ${{ vars.NAIS_TEAM }} | |
| identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} | |
| project_id: ${{ secrets.NAIS_MANAGEMENT_PROJECT_ID }} | |
| - name: Deploy to Nais | |
| uses: nais/deploy/actions/deploy@v2 | |
| env: | |
| CLUSTER: test | |
| RESOURCE: .nais/test.yaml | |
| VAR: image=${{ steps.docker-build-push.outputs.image }} | |
| TELEMETRY: ${{ steps.docker-build-push.outputs.telemetry }} | |
| DEPLOY_SERVER: deploy.ssb.cloud.nais.io:443 |