diff --git a/.github/workflows/sync-modules.yml b/.github/workflows/sync-modules.yml index 88bd73a..ddd5785 100644 --- a/.github/workflows/sync-modules.yml +++ b/.github/workflows/sync-modules.yml @@ -4,14 +4,8 @@ on: pull_request: types: [opened, reopened, synchronize, labeled, unlabeled] jobs: - management_layer: + clone_repositories: 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 @@ -22,13 +16,51 @@ jobs: with: repository: "binbashar/le-tf-infra-aws" path: le-tf-infra-aws + - name: Upload Workspace + uses: actions/upload-artifact@v2 + with: + path: ${{ github.workspace }} + name: template + 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: Download Workspace + uses: actions/download-artifact@v2 + with: + name: template + - name: list files + run: | + pwd + ls -la - 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 status + - name: Upload Workspace + uses: actions/upload-artifact@v2 + with: + path: ${{ github.workspace }} + name: template + pull_request: + runs-on: ubuntu-latest + needs: management_layer + steps: + - name: Download Workspace + uses: actions/download-artifact@v2 + with: + name: template + - name: list files + run: | + pwd + ls -la - name: Create PR uses: peter-evans/create-pull-request@v7 with: