Skip to content

Commit

Permalink
[KAIZEN-0] migrate to Google Artifact Registry
Browse files Browse the repository at this point in the history
  • Loading branch information
abrhanav committed Dec 20, 2023
1 parent 0aadec0 commit 7fa06ca
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ concurrency:
cancel-in-progress: true

env:
IMAGE: ghcr.io/${{ github.repository }}/internarbeidsflatedecorator:${{ github.sha }}
CI: true
TZ: Europe/Oslo

Expand Down Expand Up @@ -35,15 +34,17 @@ jobs:
runs-on: ubuntu-latest
permissions:
packages: write
outputs:
image: ${{ steps.docker-build-push.outputs.image }}
steps:
- uses: actions/checkout@v3
- name: Publish Docker image
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
docker build --tag ${IMAGE} .
docker login ghcr.io -u ${GITHUB_REPOSITORY} -p ${GITHUB_TOKEN}
docker push ${IMAGE}
uses: nais/docker-build-push@v0
id: docker-build-push
with:
team: personoversikt
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}

deploy-qa:
name: Deploy to preprod
Expand All @@ -55,13 +56,13 @@ jobs:
q_env: [q0, q1]
steps:
- uses: actions/checkout@v3
- uses: nais/deploy/actions/deploy@v1
- uses: nais/deploy/actions/deploy@v2
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
PRINT_PAYLOAD: true
CLUSTER: dev-fss
RESOURCE: .nais/qa-template.yaml
VAR: q_env=${{matrix.q_env}}
VAR: q_env=${{matrix.q_env}},image=${{ needs.build-and-push.outputs.image }}

deploy-prod:
name: Deploy to prod
Expand All @@ -70,12 +71,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: nais/deploy/actions/deploy@v1
- uses: nais/deploy/actions/deploy@v2
env:
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
PRINT_PAYLOAD: true
CLUSTER: prod-fss
RESOURCE: .nais/prod.yaml
VAR: image=${{ needs.build-and-push.outputs.image }}

deploy-gh-pages:
name: Deploy til gh-pages
Expand Down

0 comments on commit 7fa06ca

Please sign in to comment.