Skip to content

Commit a2cc9a4

Browse files
committed
make azure workflow reflect original workflow
1 parent c2cc86c commit a2cc9a4

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

.github/workflows/pull-request-test.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,28 +86,31 @@ jobs:
8686
needs: [check-deploy]
8787
permissions:
8888
pull-requests: write
89-
if: github.event.action != 'closed' && needs.check-deploy.outputs.pr-contains-string == 'true'
89+
if: github.event.action != 'closed'
9090
environment:
9191
name: ci-renku-${{ github.event.number }}
9292
url: https://ci-renku-${{ github.event.number }}.dev.renku.ch
9393
steps:
9494
- uses: actions/checkout@v4.1.7
9595
- name: Find deployment url
96+
if: needs.check-deploy.outputs.pr-contains-string == 'true'
9697
uses: peter-evans/find-comment@v3
9798
id: deploymentUrlMessage
9899
with:
99100
issue-number: ${{ github.event.pull_request.number }}
100101
comment-author: "RenkuBot"
101102
body-includes: "You can access the deployment of this PR at"
102103
- name: Create comment deployment url
103-
if: steps.deploymentUrlMessage.outputs.comment-id == 0
104+
if: steps.deploymentUrlMessage.outputs.comment-id == 0 &&
105+
needs.check-deploy.outputs.pr-contains-string == 'true'
104106
uses: peter-evans/create-or-update-comment@v4
105107
with:
106108
token: ${{ secrets.RENKUBOT_GITHUB_TOKEN }}
107109
issue-number: ${{ github.event.pull_request.number }}
108110
body: |
109111
You can access the deployment of this PR at https://ci-renku-${{ github.event.number }}.dev.renku.ch
110112
- name: renku build and deploy
113+
if: needs.check-deploy.outputs.pr-contains-string == 'true'
111114
uses: SwissDataScienceCenter/renku-actions/deploy-renku@v1.18.0
112115
env:
113116
DOCKER_PASSWORD: ${{ secrets.RENKU_DOCKER_PASSWORD }}
@@ -138,10 +141,11 @@ jobs:
138141
permissions:
139142
pull-requests: write
140143
id-token: write
141-
if: github.event.action != 'closed' && needs.check-deploy.outputs.azure-deploy == 'true'
144+
if: github.event.action != 'closed'
142145
steps:
143146
- uses: actions/checkout@v4.1.7
144147
- name: Find deployment url
148+
if: needs.check-deploy.outputs.azure-deploy == 'true'
145149
uses: peter-evans/find-comment@v3
146150
id: deploymentUrlMessage
147151
with:
@@ -150,7 +154,8 @@ jobs:
150154
body-includes: "You can access the deployment of this PR at"
151155

152156
- name: Create comment deployment url
153-
if: steps.deploymentUrlMessage.outputs.comment-id == 0
157+
if: steps.deploymentUrlMessage.outputs.comment-id == 0 &&
158+
needs.check-deploy.outputs.azure-deploy == 'true'
154159
uses: peter-evans/create-or-update-comment@v4
155160
with:
156161
token: ${{ secrets.RENKUBOT_GITHUB_TOKEN }}
@@ -159,17 +164,20 @@ jobs:
159164
You can access the deployment of this PR at ${{ format('https://ci-renku-{0}.dev.azure.renku.ch', github.event.number) }}
160165
161166
- name: Azure login
167+
if: needs.check-deploy.outputs.azure-deploy == 'true'
162168
uses: azure/login@v2
163169
with:
164170
client-id: ${{ secrets.CI_RENKU_AZURE_CLIENT_ID }}
165171
tenant-id: ${{ secrets.CI_RENKU_AZURE_TENANT_ID }}
166172
subscription-id: ${{ secrets.CI_RENKU_AZURE_SUBSCRIPTION_ID }}
167173
- uses: azure/aks-set-context@v4
174+
if: needs.check-deploy.outputs.azure-deploy == 'true'
168175
with:
169176
resource-group: "renku-dev"
170177
cluster-name: "aks-switzerlandnorth-renku-dev"
171178

172179
- name: Get AKS credentials
180+
if: needs.check-deploy.outputs.azure-deploy == 'true'
173181
run: |
174182
az aks get-credentials --resource-group renku-dev --name aks-switzerlandnorth-renku-dev --file "${{ github.workspace }}/renkubot-kube.config"
175183
chmod 600 "${{ github.workspace }}/renkubot-kube.config"
@@ -179,6 +187,7 @@ jobs:
179187
echo "EOF" >> $GITHUB_ENV
180188
181189
- name: renku build and deploy
190+
if: needs.check-deploy.outputs.azure-deploy == 'true'
182191
uses: SwissDataScienceCenter/renku-actions/deploy-renku@v1.18.0
183192
env:
184193
DOCKER_PASSWORD: ${{ secrets.RENKU_DOCKER_PASSWORD }}

0 commit comments

Comments
 (0)