Skip to content

Commit 543c2ce

Browse files
committed
fix: cicd
1 parent 4ef4fc2 commit 543c2ce

File tree

1 file changed

+11
-37
lines changed

1 file changed

+11
-37
lines changed

.github/workflows/develop_mastercheft2.yml

Lines changed: 11 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -41,55 +41,29 @@ jobs:
4141

4242
deploy:
4343
runs-on: ubuntu-latest
44-
needs: build
44+
needs: build-and-test
45+
if: github.ref == 'refs/heads/main'
4546
permissions:
46-
id-token: write
47-
contents: read
47+
id-token: write
48+
contents: read
4849

4950
steps:
50-
- name: Download artifact from build job
51+
- name: 📥 Descargar artefacto generado
5152
uses: actions/download-artifact@v4
5253
with:
53-
name: java-app
54+
name: masterchef-api
5455

55-
- name: Login to Azure
56+
- name: 🔐 Login a Azure
5657
uses: azure/login@v2
5758
with:
5859
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_E3BBA8DC2C9849D1B0EFC1E10CE96DD0 }}
59-
tenant-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_A24240666636424A8BBF6C81D16FE73E }}
60-
subscription-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_7C9E359957B94BC8950CA740807D8487 }}
60+
tenant-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_7C9E359957B94BC8950CA740807D8487 }}
61+
subscription-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_A24240666636424A8BBF6C81D16FE73E }}
6162

62-
- name: Deploy to Azure Web App
63-
id: deploy-to-webapp
63+
- name: 🚀 Desplegar en Azure Web App
6464
uses: azure/webapps-deploy@v3
6565
with:
66-
app-name: 'theboys-sirha'
67-
slot-name: 'Production'
66+
app-name: 'masterchefT2'
6867
package: '*.jar'
69-
deploy:
70-
runs-on: ubuntu-latest
71-
needs: build
72-
permissions:
73-
id-token: write
74-
contents: read
7568

76-
steps:
77-
- name: Download artifact from build job
78-
uses: actions/download-artifact@v4
79-
with:
80-
name: java-app
81-
82-
- name: Login to Azure
83-
uses: azure/login@v2
84-
with:
85-
client-id: ${{ secrets.AZUREAPPSERVICE_CLIENTID_E3BBA8DC2C9849D1B0EFC1E10CE96DD0 }}
86-
tenant-id: ${{ secrets.AZUREAPPSERVICE_SUBSCRIPTIONID_A24240666636424A8BBF6C81D16FE73E }}
87-
subscription-id: ${{ secrets.AZUREAPPSERVICE_TENANTID_7C9E359957B94BC8950CA740807D8487 }}
8869

89-
- name: Deploy to Azure Web App
90-
id: deploy-to-webapp
91-
uses: azure/webapps-deploy@v3
92-
with:
93-
app-name: 'theboys-sirha'
94-
slot-name: 'Production'
95-
package: '*.jar'

0 commit comments

Comments
 (0)