Skip to content

Commit

Permalink
ci: deploy function-app from windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Alxandr committed Nov 12, 2024
1 parent f5fef38 commit cc76d1b
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 13 deletions.
10 changes: 5 additions & 5 deletions .github/actions/deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ runs:
FORCE_COLOR: '2'
run: deno run -A ./.github/actions/deploy/deploy.mts

- name: Deploy FunctionApp
uses: Azure/functions-action@v1
with:
app-name: ${{ inputs.function-app }}
package: ${{ inputs.function-app-path }}
# - name: Deploy FunctionApp
# uses: Azure/functions-action@v1
# with:
# app-name: ${{ inputs.function-app }}
# package: ${{ inputs.function-app-path }}
51 changes: 43 additions & 8 deletions .github/workflows/build-deploy-at.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ jobs:
path: ./src/Functions/Altinn.Auth.AuditLog.Functions/output/
include-hidden-files: true

deploy:
name: Deploy to ${{ matrix.environment }}
deploy-container-app:
name: Deploy container-app to ${{ matrix.environment }}
runs-on: ubuntu-latest
environment: ${{ matrix.environment }}
needs:
Expand All @@ -94,12 +94,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Download built function-app
uses: actions/download-artifact@v4
with:
name: function-app
path: ./artifacts/function-app

- name: Azure Login
uses: azure/login@v2
with:
Expand All @@ -115,3 +109,44 @@ jobs:
container-app: ${{ vars.CONTAINER_APP_NAME }}
function-app: ${{ vars.AZURE_FUNCTIONAPP_NAME }}
function-app-path: ./artifacts/function-app

deploy-function-app:
name: Deploy function-app to ${{ matrix.environment }}
runs-on: windows-latest
environment: ${{ matrix.environment }}
needs:
- deploy-container-app
- build-function-app

permissions:
id-token: write
contents: read
packages: read

strategy:
fail-fast: false
matrix:
environment: [AT21, AT22, AT23, AT24]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download built function-app
uses: actions/download-artifact@v4
with:
name: function-app
path: ./artifacts/function-app

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

- name: Deploy FunctionApp
uses: Azure/functions-action@v1
with:
app-name: ${{ vars.AZURE_FUNCTIONAPP_NAME }}
package: ./artifacts/function-app

0 comments on commit cc76d1b

Please sign in to comment.