Skip to content

Commit 8bba9cf

Browse files
authored
Merge pull request #72 from worldcoin/INFRA-5566
switch to local script again as public repo cannot reach anything private
2 parents 7597a29 + 6a7bbbe commit 8bba9cf

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

.github/workflows/terraform-update-modules-public-pull.yaml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,20 @@ jobs:
2525
steps:
2626
- name: Check out repository code
2727
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
28-
with:
29-
path: terraform-aws-eks
28+
3029

3130
- name: Bump module dependencies
32-
uses: worldcoin/gh-actions/dependency-updater@dependency-updater-v0.0.2
33-
with:
34-
github_repos_list: ${{ env.REPOS }}
35-
github_repo_token: ${{ github.token }}
36-
github_repo_path: terraform-aws-eks
31+
run: |
32+
MODULES="terraform-aws-nlb terraform-aws-alb terraform-datadog-kubernetes"
33+
34+
for MOD in $MODULES; do
35+
V=$(curl -s https://api.github.com/repos/worldcoin/$MOD/releases/latest -H "Accept: application/vnd.github+json" -H "Authorization: Bearer $GITHUB_TOKEN" -H "X-GitHub-Api-Version: 2022-11-28" \ | jq -r '.tag_name')
36+
for i in $(git grep -l "source .*worldcoin/$MOD.*ref"); do
37+
echo "Bumping $MOD to $V in $i"
38+
sed -i "s/\(source .*worldcoin\/$MOD.*ref=\).*$/\1$V\"/" $i
39+
done
40+
done
41+
3742
3843
- name: Open PR with all .tf updates
3944
uses: peter-evans/create-pull-request@98357b18bf14b5342f975ff684046ec3b2a07725
@@ -43,7 +48,6 @@ jobs:
4348
delete-branch: true
4449
commit-message: Update all TF module repos to latest
4550
title: Update all TF module repos to latest
46-
path: terraform-aws-eks
4751
body: |
4852
Update all TF module repos to latest
4953

0 commit comments

Comments
 (0)