Skip to content

Commit

Permalink
GH workflow adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
bdb-dd committed Jul 4, 2024
1 parent 9efb74c commit e5708aa
Showing 1 changed file with 20 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Trigger auto deployment for assistants-slack-digdir
name: prod-slack-digdir - Auto deploy

# When this action will be executed
on:
Expand All @@ -13,25 +13,36 @@ on:
# Allow manual trigger
workflow_dispatch:

permissions:
id-token: write
contents: read

jobs:
build-and-deploy:
name: Build, push and deploy container image
runs-on: ubuntu-latest
permissions:
id-token: write #This is required for requesting the OIDC JWT Token
contents: read #Required when GH token is used to authenticate with private repo

env:
REGISTRY: altinnaicontainers.azurecr.io
REPOSITORY: digdir-assistants
AZURE_CLIENT_ID: ${{ secrets.ASSISTANTSSLACKDIGDIR_AZURE_CLIENT_ID }}
AZURE_TENANT_ID: ${{ secrets.ASSISTANTSSLACKDIGDIR_AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.ASSISTANTSSLACKDIGDIR_AZURE_SUBSCRIPTION_ID }}
ACTION_USER: ${{ secrets.ACTION_USER }}
ACTION_PAT: ${{ secrets.ACTION_PAT }}
SLACK_APP_SUPABASE_API_URL: ${{ vars.SLACK_APP_SUPABASE_API_URL }}
SLACK_APP_SUPABASE_ANON_KEY: ${{ secrets.SLACK_APP_SUPABASE_ANON_KEY }}
steps:
- name: Checkout to the branch
uses: actions/checkout@v4

- name: Azure Login
uses: azure/login@v2
with:
client-id: ${{ secrets.ASSISTANTSSLACKDIGDIR_AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.ASSISTANTSSLACKDIGDIR_AZURE_TENANT_ID }}
subscription-id: ${{ secrets.ASSISTANTSSLACKDIGDIR_AZURE_SUBSCRIPTION_ID }}
client-id: ${{ env.AZURE_CLIENT_ID }}
tenant-id: ${{ env.AZURE_TENANT_ID }}
subscription-id: ${{ env.AZURE_SUBSCRIPTION_ID }}

- name: Build and push container image to registry
- name: Build, push and deploy container image to registry
uses: azure/container-apps-deploy-action@v2
with:
appSourcePath: ${{ github.workspace }}
Expand Down Expand Up @@ -64,5 +75,3 @@ jobs:
"DEBUG_SLACK=${{ vars.DEBUG_SLACK }}"
"DEBUG_INSTRUCTOR=${{ vars.DEBUG_INSTRUCTOR }}"
"LOG_LEVEL=${{ vars.LOG_LEVEL }}"

0 comments on commit e5708aa

Please sign in to comment.