Skip to content

Commit

Permalink
Deploy by digest
Browse files Browse the repository at this point in the history
  • Loading branch information
mallport committed Oct 1, 2024
1 parent 72b4403 commit f2871d2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ on:
workflow_dispatch:

env:
REGISTRY: europe-north1-docker.pkg.dev/artifact-registry-5n/dapla-stat-docker/maskinporten-guardian
REGISTRY: europe-north1-docker.pkg.dev/artifact-registry-5n/dapla-stat-docker
IMAGE: maskinporten-guardian
TAG: ${{ github.sha }}


jobs:
docker-build:
Expand All @@ -34,7 +32,8 @@ jobs:
id-token: "write"
runs-on: ubuntu-latest
outputs:
image-tag: ${{ env.DOCKER_IMAGE }}
image: ${{ env.DOCKER_IMAGE }}
image-digest: ${{ steps.docker_build.outputs.digest }}
steps:
- name: Setup Maven Action # Composite action
uses: s4u/[email protected]
Expand All @@ -45,7 +44,7 @@ jobs:

- name: Set docker image env var
run: |
echo "DOCKER_IMAGE=${REGISTRY}/${IMAGE}:${TAG}" >> $GITHUB_ENV
echo "DOCKER_IMAGE=${REGISTRY}/${IMAGE}" >> $GITHUB_ENV
- name: "Authenticate to Google Cloud"
id: "auth"
uses: "google-github-actions/[email protected]"
Expand Down Expand Up @@ -123,5 +122,5 @@ jobs:
env:
CLUSTER: test
RESOURCE: .nais/test.yaml
VAR: image=${{ needs.docker-build.outputs.image-tag }}
VAR: image=${{ needs.docker-build.outputs.image }}@${{ needs.docker-build.outputs.image-digest }}
DEPLOY_SERVER: deploy.ssb.cloud.nais.io:443

0 comments on commit f2871d2

Please sign in to comment.