Skip to content

Commit

Permalink
proddeploy med GAR
Browse files Browse the repository at this point in the history
  • Loading branch information
olesls committed Dec 31, 2023
1 parent b903271 commit 51f3f29
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/deploy-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,44 @@ jobs:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v3
- name: get release tag

# - name: get release tag
# env:
# VERSION_TAG: ${{ github.event.release.tag_name }}
# run: |
# APPLICATION=$(echo $GITHUB_REPOSITORY | cut -d "/" -f 2)
# IMAGE=ghcr.io/$GITHUB_REPOSITORY:$VERSION_TAG
# echo "IMAGE=${IMAGE}" >> $GITHUB_ENV
# echo $IMAGE

- uses: nais/login@v0
name: get image registry
id: nais-login
with:
team: teamdigihot
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}

- name: get image
env:
VERSION_TAG: ${{ github.event.release.tag_name }}
REGISTRY: ${{ steps.nais-login.outputs.registry }}
APP: ${{ github.event.repository.name }}
run: |
APPLICATION=$(echo $GITHUB_REPOSITORY | cut -d "/" -f 2)
IMAGE=ghcr.io/$GITHUB_REPOSITORY:$VERSION_TAG
IMAGE=$REGISTRY/$APP:$VERSION_TAG
echo "IMAGE=${IMAGE}" >> $GITHUB_ENV
echo $IMAGE
- uses: nais/deploy/actions/deploy@v2
name: Deploy til prod-gcp
env:
CLUSTER: prod-gcp
RESOURCE: .nais/prod.yaml
VAR: commit=${{ github.sha }}

- uses: navikt/digihot-deploy/actions/post-production@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 51f3f29

Please sign in to comment.