From 009807ac2d44a1d797610b9a0fe527f9e4b2db10 Mon Sep 17 00:00:00 2001 From: vassbamba <47458716+vassbamba@users.noreply.github.com> Date: Sun, 29 Sep 2024 23:38:22 +0000 Subject: [PATCH 1/8] Add or update the Azure App Service build and deployment workflow config --- .github/workflows/master_app1.yml | 75 +++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .github/workflows/master_app1.yml diff --git a/.github/workflows/master_app1.yml b/.github/workflows/master_app1.yml new file mode 100644 index 000000000..17687cee7 --- /dev/null +++ b/.github/workflows/master_app1.yml @@ -0,0 +1,75 @@ +# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy +# More GitHub Actions for Azure: https://github.com/Azure/actions + +name: Build and deploy PHP app to Azure Web App - app1 + +on: + push: + branches: + - master + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.3' + + - name: Check if composer.json exists + id: check_files + uses: andstor/file-existence-action@v1 + with: + files: 'composer.json' + + - name: Run composer install if composer.json exists + if: steps.check_files.outputs.files_exists == 'true' + run: composer validate --no-check-publish && composer install --prefer-dist --no-progress + + - name: Zip artifact for deployment + run: zip release.zip ./* -r + + - name: Upload artifact for deployment job + uses: actions/upload-artifact@v4 + with: + name: php-app + path: release.zip + + deploy: + runs-on: ubuntu-latest + needs: build + environment: + name: 'Production' + url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} + permissions: + id-token: write #This is required for requesting the JWT + + steps: + - name: Download artifact from build job + uses: actions/download-artifact@v4 + with: + name: php-app + + - name: Unzip artifact for deployment + run: unzip release.zip + + - name: Login to Azure + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_31BCB6F2B78742D69635E8194F019DE3 }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_41F660A0DB7A4E16A4F767729CC900BC }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_C0C7866DD3D34151A8EEAFB57D38D29A }} + + - name: 'Deploy to Azure Web App' + uses: azure/webapps-deploy@v3 + id: deploy-to-webapp + with: + app-name: 'app1' + slot-name: 'Production' + package: . + \ No newline at end of file From 19e1dbfdb6fe33467099448a6d4ebf514db08df0 Mon Sep 17 00:00:00 2001 From: vassbamba <47458716+vassbamba@users.noreply.github.com> Date: Sun, 29 Sep 2024 23:50:26 +0000 Subject: [PATCH 2/8] okay --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 82966e27a..7b1dba78e 100644 --- a/index.php +++ b/index.php @@ -1,3 +1,3 @@ Date: Wed, 2 Oct 2024 01:08:52 +0000 Subject: [PATCH 3/8] v1.0.0 --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 7b1dba78e..ba04a1e99 100644 --- a/index.php +++ b/index.php @@ -1,3 +1,3 @@ Date: Wed, 2 Oct 2024 01:12:00 +0000 Subject: [PATCH 4/8] v1.0.2 --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index ba04a1e99..3f570ece8 100644 --- a/index.php +++ b/index.php @@ -1,3 +1,3 @@ Date: Fri, 1 Nov 2024 08:50:20 +0000 Subject: [PATCH 5/8] Add or update the Azure App Service build and deployment workflow config --- .github/workflows/master_app1.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/master_app1.yml b/.github/workflows/master_app1.yml index 17687cee7..867b23ec8 100644 --- a/.github/workflows/master_app1.yml +++ b/.github/workflows/master_app1.yml @@ -61,9 +61,9 @@ jobs: - name: Login to Azure uses: azure/login@v2 with: - client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_31BCB6F2B78742D69635E8194F019DE3 }} - tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_41F660A0DB7A4E16A4F767729CC900BC }} - subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_C0C7866DD3D34151A8EEAFB57D38D29A }} + client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_E89A20DC265F420BA287A283E866B92D }} + tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_01678EBA91174200AEC6E19E2805EB5A }} + subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_948C45073C1A4FE58E83ABB75B84E9CC }} - name: 'Deploy to Azure Web App' uses: azure/webapps-deploy@v3 From 7c8c763e61aea63c6845250188733d8f5ee59deb Mon Sep 17 00:00:00 2001 From: vassbamba <47458716+vassbamba@users.noreply.github.com> Date: Fri, 1 Nov 2024 08:59:02 +0000 Subject: [PATCH 6/8] Update index.php --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 3f570ece8..fa072cafe 100644 --- a/index.php +++ b/index.php @@ -1,3 +1,3 @@ Date: Fri, 1 Nov 2024 09:16:55 +0000 Subject: [PATCH 7/8] dev_hamed test --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index fa072cafe..7f5c9d550 100644 --- a/index.php +++ b/index.php @@ -1,3 +1,3 @@ Date: Fri, 1 Nov 2024 09:32:27 +0000 Subject: [PATCH 8/8] Update index.php --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 7f5c9d550..4df890f7a 100644 --- a/index.php +++ b/index.php @@ -1,3 +1,3 @@