Skip to content

feat(SYNC-MODULES): Add modules syncronization with le-tf-infra-aws repo #8

feat(SYNC-MODULES): Add modules syncronization with le-tf-infra-aws repo

feat(SYNC-MODULES): Add modules syncronization with le-tf-infra-aws repo #8

Workflow file for this run

name: Synchronize Module Versions
on:
workflow_dispatch:
pull_request:
types: [opened, reopened, synchronize, labeled, unlabeled]
jobs:
management_layer:
runs-on: ubuntu-latest
strategy:
matrix:
modules: [
["management/global/sso/account_assignments.tf", "management/global/sso/account_assignments.tf"],
["management/us-east-1/base-tf-backend/main.tf", "management/primary_region/base-tf-backend/main.tf"]
]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: le-tf-infra-aws-template
- name: Checkout le-tf-infra-aws repo
uses: actions/checkout@v4
with:
repository: "binbashar/le-tf-infra-aws"
path: le-tf-infra-aws
- name: Sync modules
run: |
cd le-tf-infra-aws-template
ls -la
chmod +x sync_modules.sh
./sync_modules.sh ../le-tf-infra-aws/${{ matrix.modules[0] }} template/${{ matrix.modules[1] }}
git add ${{ matrix.modules[1] }}
- name: Create PR
uses: peter-evans/create-pull-request@v7
with:
commit-message: "Sync ${{ matrix.modules[1] }} module"
title: "Sync Management Layer modules"
body: |
## What?
* Syncronize the management layer terraform modules versions with the le-tf-infra-aws repository.
## Why?
* To keep the management layer modules up to date with the le-tf-infra-aws repository.
## References
* [le-tf-infra-aws]()
branch: "sync-management-layer-modules"
branch-suffix: timestamp
base: "master"
labels: |
enhancement
patch