Skip to content

Commit

Permalink
ci: deploy from linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Alxandr committed Nov 12, 2024
1 parent edfdd16 commit a5a990d
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 45 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 }}
87 changes: 47 additions & 40 deletions .github/workflows/build-deploy-at.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ jobs:
environment: ${{ matrix.environment }}
needs:
- build-container-app
- build-function-app

permissions:
id-token: write
Expand All @@ -103,6 +104,12 @@ 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 @@ -119,43 +126,43 @@ jobs:
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
# 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 a5a990d

Please sign in to comment.