Skip to content

Commit cffc78c

Browse files
authored
chore: validate bucket name and distribution id using github script (#238)
1 parent 0f135f4 commit cffc78c

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,16 @@ jobs:
6969
bundle install
7070
bundle exec rake build
7171
72-
# TODO: fail workflow if bucket name or distribution_id is not found
72+
- name: Validate Outputs
73+
uses: actions/github-script@v6
74+
with:
75+
script: |
76+
const bucketName = steps.terragrunt_output.outputs.bucket_name;
77+
const distributionId = steps.terragrunt_output.outputs.distribution_id;
78+
79+
if (!bucketName || !distributionId) {
80+
core.setFailed('Required outputs not found');
81+
}
7382
7483
- name: Copy output to S3
7584
run: aws s3 sync ./_site/ s3://${{ steps.terragrunt_output.outputs.bucket_name }} --acl public-read --delete --cache-control max-age=604800

0 commit comments

Comments
 (0)