-
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (40 loc) · 1.68 KB
/
sync_modules.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Synchorize Modules Version
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@v2
- name: Create branch
run: git checkout -b sync-management-layer-modules
#- name: Clone le-tf-infra-aws repo
# run: |
# cd ../
# git clone [email protected]:binbashar/le-tf-infra-aws.git
#- name: Sync modules
# run: |
# cd le-tf-infra-aws-template
# chmod +x sync_modules.sh
# ./sync_modules.sh ${{ matrix.modules[0] }} ${{ matrix.modules[1] }}
# git add ${{ matrix.modules[1] }}
# git commit -m "Sync ${{ matrix.modules[1] }} module"
- name: Create PR
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Sync ${{ matrix.modules[1] }} module"
title: "Sync Management Layer modules"
body: "Sync ${{ matrix.modules[0] }} and ${{ matrix.modules[1] }} modules"
branch: "sync-management-layer-modules"
base: "master"
labels: "enhancement"