Skip to content

Commit

Permalink
BAU: Fix workflows to make pre-commit happy
Browse files Browse the repository at this point in the history
  • Loading branch information
whi-tw committed Jul 18, 2024
1 parent dab40e9 commit e0b66c9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 63 deletions.
25 changes: 15 additions & 10 deletions .github/workflows/build-deploy-frontend-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,26 +139,26 @@ jobs:
ECR_REPOSITORY: ${{ env.DEV_TOOLING_ECR_FRONTEND_REPO }}
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker build -t "$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" .
docker push "$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"
- name: Build, tag, and push basic-auth-sidecar
working-directory: basic-auth-sidecar
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: ${{ env.DEV_BASIC_SIDECAR_ECR_REPO }}
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker build -t "$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" .
docker push "$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"
- name: Build, tag, and push service down page
working-directory: service-down-page-config
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: ${{ env.DEV_SERVICE_DOWN_ECR_REPO }}
IMAGE_TAG: ${{ github.sha }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker build -t "$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" .
docker push "$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"
deploy:
needs:
Expand All @@ -182,11 +182,16 @@ jobs:
- name: Upload frontend Terraform files
working-directory: ci/terraform
run: |
echo "::group::Zip up frontend terraform"
zip -r frontend.zip .
S3_RESPONSE=`aws s3api put-object \
echo "::endgroup::"
echo "::group::Upload artifact to S3"
OBJECT_VERSION="$(aws s3api put-object \
--bucket ${{ env.DEV_ARTIFACT_BUCKET }} \
--key frontend.zip \
--body frontend.zip \
--metadata '${{ toJson(fromJson(needs.pr-data.outputs.data)) }}'`
VERSION=`echo $S3_RESPONSE | jq .VersionId -r`
echo "VERSION=$VERSION" >> $GITHUB_ENV
--metadata '${{ toJson(fromJson(needs.pr-data.outputs.data)) }}' \
--query VersionId --output text)"
echo "::endgroup::"
echo "::notice title=Final artifact uploaded to S3::object: frontend.zip, version: ${OBJECT_VERSION}"
50 changes: 0 additions & 50 deletions .github/workflows/pre-merge-checks-python.yaml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/pre-merge-checks-terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Get Terraform version
id: getterraformversion
run: echo "::set-output name=version::$(cat ci/terraform/.terraform-version)"
id: get-terraform-version
run: echo "version=$(cat ci/terraform/.terraform-version)" >> "${GITHUB_OUTPUT}"

- uses: hashicorp/setup-terraform@651471c36a6092792c552e8b1bef71e592b462d8 # v3.1.1
with:
terraform_version: ${{ steps.getterraformversion.outputs.version }}
terraform_version: ${{ steps.get-terraform-version.outputs.version }}

- name: Terraform Format Check
working-directory: ci/terraform/
Expand Down

0 comments on commit e0b66c9

Please sign in to comment.