Skip to content

Commit 6bb95a3

Browse files
authored
ci: Update build.yml workflow
1 parent 5aacd59 commit 6bb95a3

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,12 @@ jobs:
427427

428428
steps:
429429
- name: Deploy to staging
430-
run: |
431-
curl -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${{ secrets.GH_INFRA_K8S_TOKEN }}" ${{ secrets.GHA_K8S_DEPLOY_API }} -d '{"ref":"main", "inputs": { "environment":"${{ secrets.GHA_K8S_CLUSTER }}", "app":"datatracker", "appVersion":"${{ env.PKG_VERSION }}" }}'
430+
uses: the-actions-org/workflow-dispatch@v4
431+
with:
432+
workflow: deploy.yml
433+
repo: ietf-tools/infra-k8s
434+
token: ${{ secrets.GH_INFRA_K8S_TOKEN }}
435+
inputs: '{"ref":"main", "inputs": { "environment":"${{ secrets.GHA_K8S_CLUSTER }}", "app":"datatracker", "appVersion":"${{ env.PKG_VERSION }}", "remoteRef":"${{ github.sha }}" }}'
432436

433437
# -----------------------------------------------------------------
434438
# PROD
@@ -442,8 +446,12 @@ jobs:
442446
name: production
443447
env:
444448
PKG_VERSION: ${{needs.prepare.outputs.pkg_version}}
445-
449+
446450
steps:
447451
- name: Deploy to production
448-
run: |
449-
curl -X POST -H "Accept: application/vnd.github.v3+json" -H "Authorization: Bearer ${{ secrets.GH_INFRA_K8S_TOKEN }}" ${{ secrets.GHA_K8S_DEPLOY_API }} -d '{"ref":"main", "inputs": { "environment":"${{ secrets.GHA_K8S_CLUSTER }}", "app":"datatracker", "appVersion":"${{ env.PKG_VERSION }}" }}'
452+
uses: the-actions-org/workflow-dispatch@v4
453+
with:
454+
workflow: deploy.yml
455+
repo: ietf-tools/infra-k8s
456+
token: ${{ secrets.GH_INFRA_K8S_TOKEN }}
457+
inputs: '{"ref":"main", "inputs": { "environment":"${{ secrets.GHA_K8S_CLUSTER }}", "app":"datatracker", "appVersion":"${{ env.PKG_VERSION }}", "remoteRef":"${{ github.sha }}" }}'

0 commit comments

Comments
 (0)