From 5de49ed0e8c0a7193a5ef44768d7bc3ac757a172 Mon Sep 17 00:00:00 2001 From: Felipe Augusto Date: Mon, 14 Oct 2024 12:12:46 -0300 Subject: [PATCH] feat: update gh actions --- .github/workflows/AzureFunction.yaml | 101 +++++++++++++++------------ 1 file changed, 55 insertions(+), 46 deletions(-) diff --git a/.github/workflows/AzureFunction.yaml b/.github/workflows/AzureFunction.yaml index c861f48..aa6e46d 100644 --- a/.github/workflows/AzureFunction.yaml +++ b/.github/workflows/AzureFunction.yaml @@ -59,49 +59,6 @@ jobs: run: | dotnet build ${{ env.app_full_path }} --configuration Release --output ${{ env.app_path }}/output --no-incremental - # - name: 'Build' - # shell: bash - # run: | - # pushd ${{ env.app_path }} - # dotnet build --configuration Release --output ./output - # popd - - - name: Zip files - run: | - cd ${{ env.app_path }}/output - zip -r ${{ env.app_name }}.zip . - - - name: 'Publish Artifact for Azure Functions' - uses: actions/upload-artifact@v4 - with: - name: function-artifact - path: ${{ env.app_path }}/output - retention-days: 5 - overwrite: true - compression-level: 9 - - deploy: - if: ${{ github.event_name != 'pull_request' }} - runs-on: ubuntu-latest - needs: build - - steps: - - name: Log in to Azure - uses: azure/login@v2.2.0 - with: - creds: ${{ secrets.AZURE_CREDENTIALS }} - - - name: Download Artifact for Azure Functions - uses: actions/download-artifact@v4 - with: - name: function-artifact - path: ${{ env.app_path }}/output - - - name: Verificando o download do artefato - run: | - ls - ls -la ${{ env.app_path }}/output - - name: 'Run Azure Functions Action' uses: Azure/functions-action@v1.5.2 id: deploy-function-app @@ -111,6 +68,58 @@ jobs: publish-profile: ${{ secrets.FUNCTION_PUBLISH_PROFILE }} package: ${{ env.app_path }}/output - - name: Log out from Azure - run: | - az logout + # - name: 'Build' + # shell: bash + # run: | + # pushd ${{ env.app_path }} + # dotnet build --configuration Release --output ./output + # popd +### +# - name: Zip files +# run: | +# cd ${{ env.app_path }}/output +# zip -r ${{ env.app_name }}.zip . + +# - name: 'Publish Artifact for Azure Functions' +# uses: actions/upload-artifact@v4 +# with: +# name: function-artifact +# path: ${{ env.app_path }}/output +# retention-days: 5 +# overwrite: true +# compression-level: 9 + +# deploy: +# if: ${{ github.event_name != 'pull_request' }} +# runs-on: ubuntu-latest +# needs: build + +# steps: +# - name: Log in to Azure +# uses: azure/login@v2.2.0 +# with: +# creds: ${{ secrets.AZURE_CREDENTIALS }} + +# - name: Download Artifact for Azure Functions +# uses: actions/download-artifact@v4 +# with: +# name: function-artifact +# path: ${{ env.app_path }}/output + +# - name: Verificando o download do artefato +# run: | +# ls +# ls -la ${{ env.app_path }}/output + +# - name: 'Run Azure Functions Action' +# uses: Azure/functions-action@v1.5.2 +# id: deploy-function-app +# with: +# app-name: ${{ env.app_name }} +# slot-name: 'production' +# publish-profile: ${{ secrets.FUNCTION_PUBLISH_PROFILE }} +# package: ${{ env.app_path }}/output + +# - name: Log out from Azure +# run: | +# az logout