Skip to content

Commit

Permalink
fixed scripts.
Browse files Browse the repository at this point in the history
fixed github actions.
  • Loading branch information
y-miyazaki committed May 12, 2022
1 parent 5a18a4e commit f309c91
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
echo "::set-output name=pr_number::${PR_NUMBER}"
- name: "terraform: check"
run: |
docker pull ghcr.io/y-miyazaki/terraform-aws:latest
docker run --rm -v $PWD:/workspace -e ENV=${{ env.ENVIRONMENT }} -w /workspace --name terraform-aws ghcr.io/y-miyazaki/terraform-aws:latest scripts/terraform/integration_push.sh terraform/base
docker run --rm -v $PWD:/workspace -e ENV=${{ env.ENVIRONMENT }} -w /workspace --name terraform-aws ghcr.io/y-miyazaki/terraform-aws:latest scripts/terraform/integration_push.sh terraform/monitor
docker pull ghcr.io/y-miyazaki/terraform-aws-debian:latest
docker run --rm -v $PWD:/workspace -e ENV=${{ env.ENVIRONMENT }} -w /workspace --name terraform-aws ghcr.io/y-miyazaki/terraform-aws-debian:latest scripts/terraform/integration_push.sh terraform/base
docker run --rm -v $PWD:/workspace -e ENV=${{ env.ENVIRONMENT }} -w /workspace --name terraform-aws ghcr.io/y-miyazaki/terraform-aws-debian:latest scripts/terraform/integration_push.sh terraform/monitor
- name: "slack: notification for failed build."
if: failure()
uses: rtCamp/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/example/cd-workflow-dispatch-base-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
run: |
echo "$ENV" >> $PWD/.env
find scripts -type f -name '*.sh' -exec chmod +x \{\} \;
docker pull ghcr.io/y-miyazaki/terraform-aws:latest
docker run --rm -v $PWD:/workspace --env-file=$PWD/.env -w /workspace --name terraform-aws ghcr.io/y-miyazaki/terraform-aws:latest scripts/terraform/deploy.sh terraform/base
docker pull ghcr.io/y-miyazaki/terraform-aws-debian:latest
docker run --rm -v $PWD:/workspace --env-file=$PWD/.env -w /workspace --name terraform-aws ghcr.io/y-miyazaki/terraform-aws-debian:latest scripts/terraform/deploy.sh terraform/base
- name: "slack: notification"
if: failure()
uses: rtCamp/[email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
run: |
echo "$ENV" >> $PWD/.env
find scripts -type f -name '*.sh' -exec chmod +x \{\} \;
docker pull ghcr.io/y-miyazaki/terraform-aws:latest
docker run --rm -v $PWD:/workspace --env-file=$PWD/.env -w /workspace --name terraform-aws ghcr.io/y-miyazaki/terraform-aws:latest scripts/terraform/deploy.sh terraform/monitor
docker pull ghcr.io/y-miyazaki/terraform-aws-debian:latest
docker run --rm -v $PWD:/workspace --env-file=$PWD/.env -w /workspace --name terraform-aws ghcr.io/y-miyazaki/terraform-aws-debian:latest scripts/terraform/deploy.sh terraform/monitor
- name: "slack: notification"
if: failure()
uses: rtCamp/[email protected]
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/example/ci-push-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
run: |
echo "$ENV" >> $PWD/.env
find scripts -type f -name '*.sh' -exec chmod +x \{\} \;
docker pull ghcr.io/y-miyazaki/terraform-aws:latest
docker run --rm -v $PWD:/workspace --env-file=$PWD/.env -w /workspace --name terraform-aws ghcr.io/y-miyazaki/terraform-aws:latest scripts/terraform/integration_push.sh terraform/base
docker run --rm -v $PWD:/workspace --env-file=$PWD/.env -w /workspace --name terraform-aws ghcr.io/y-miyazaki/terraform-aws:latest scripts/terraform/integration_push.sh terraform/monitor
docker pull ghcr.io/y-miyazaki/terraform-aws-debian:latest
docker run --rm -v $PWD:/workspace --env-file=$PWD/.env -w /workspace --name terraform-aws ghcr.io/y-miyazaki/terraform-aws-debian:latest scripts/terraform/integration_push.sh terraform/base
docker run --rm -v $PWD:/workspace --env-file=$PWD/.env -w /workspace --name terraform-aws ghcr.io/y-miyazaki/terraform-aws-debian:latest scripts/terraform/integration_push.sh terraform/monitor
- name: "slack: notification"
if: failure()
uses: rtCamp/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion scripts/terraform/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e
#--------------------------------------------------------------
# recursive check
#--------------------------------------------------------------
for file in `find /workspace/ -name "main.tf" -type f`; do
for file in `find /workspace/ ! -path '*/.terraform/*' -type f -name 'main.tf'`; do
dir=`dirname $file`
cd ${dir}
pwd
Expand Down

0 comments on commit f309c91

Please sign in to comment.