Skip to content

Commit 6a61cc4

Browse files
committed
Change deployment workflow to trigger from the download download workflow.
1 parent 0d6d408 commit 6a61cc4

2 files changed

Lines changed: 15 additions & 7 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
name: 'Terraform Build and Deploy'
44

55
on:
6-
workflow_run:
7-
workflows: ["Download Google Drive File"]
8-
types: [completed]
9-
# TODO - temporary to enable workflow to appear for testing - revert below back to "main" when done with testing
10-
# branches: [main]
6+
workflow_call:
7+
inputs:
8+
artifact-name:
9+
required: true
10+
type: string
11+
description: Name of the file to be deployed to S3
1112

1213
permissions:
1314
id-token: write

.github/workflows/download.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ jobs:
2020
GOOGLE_FILE_ID: ${{ secrets.GOOGLE_FILE_ID }}
2121
GOOGLE_SERVICE_ACCOUNT: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
2222

23-
2423
defaults:
2524
run:
2625
shell: bash
@@ -68,4 +67,12 @@ jobs:
6867
run: |
6968
rm -f services.json
7069
rm -f services_decoded.json
71-
if: ${{ always() }}
70+
if: ${{ always() }}
71+
72+
trigger-deployment:
73+
uses: ./.github/workflows/deploy.yaml
74+
needs: download
75+
with:
76+
artifact-name: $ARTIFACT_NAME
77+
if: ${{ needs.download.outputs.file-byte-count > 1 }}
78+

0 commit comments

Comments
 (0)