From 7f21ffbb94f96df568b075335205eaf17233e3c4 Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 13:50:10 -0300 Subject: [PATCH 01/24] update tg action --- .github/workflows/iac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index f4d40069..6db1d269 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -174,7 +174,7 @@ jobs: - name: Init id: init - uses: gruntwork-io/terragrunt-action@v2 + uses: gruntwork-io/terragrunt-action@v2.1.1 with: tf_version: ${{ inputs.TF_VERSION }} tg_version: ${{ inputs.TG_VERSION }} From 666b92e863bf65bbd628ec5b21a97d1159ac6f76 Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 14:01:30 -0300 Subject: [PATCH 02/24] update tg version --- .github/workflows/iac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index 6db1d269..7d30fd22 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -12,7 +12,7 @@ on: TG_VERSION: required: false type: string - default: '0.57.5' + default: '0.58.2' TF_VERSION: required: false type: string From b880fa303420e9dbc1562814cce41726ff46157b Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 14:13:32 -0300 Subject: [PATCH 03/24] replace tg --- .github/workflows/iac.yml | 55 +++++++++++++++++++++++++++------------ 1 file changed, 39 insertions(+), 16 deletions(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index 7d30fd22..1a49e00a 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -137,7 +137,26 @@ jobs: service_account: ${{ inputs.GCP_SA }} - name: Install dependencies - run: sudo apt update ; sudo apt install unzip -yq + run: | + + wget https://github.com/gruntwork-io/terragrunt/releases/download/v0.58.2/terragrunt_linux_amd64 + mv terragrunt_linux_amd64 /usr/local/bin/terragrunt + chmod u+x /usr/local/bin/terragrunt + sudo apt-get update -y + sudo apt-get install -y gnupg software-properties-common + wget -O- https://apt.releases.hashicorp.com/gpg | \ + gpg --dearmor | \ + sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg > /dev/null + gpg --no-default-keyring \ + --keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg \ + --fingerprint + echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \ + https://apt.releases.hashicorp.com $(lsb_release -cs) main" | \ + sudo tee /etc/apt/sources.list.d/hashicorp.list + sudo apt update -y + sudo apt-get install terraform unzip -yq + + - name: Sops Binary Installer uses: mdgreenwald/mozilla-sops-action@v1.6.0 @@ -172,21 +191,25 @@ jobs: - run: sudo apt update ; sudo apt install git -yq ; git config --global --add safe.directory '*' - - name: Init - id: init - uses: gruntwork-io/terragrunt-action@v2.1.1 - with: - tf_version: ${{ inputs.TF_VERSION }} - tg_version: ${{ inputs.TG_VERSION }} - tg_dir: ${{ inputs.WORKING_DIR }} - tg_command: 'run-all init' - env: - # configure git to use custom token to clone repository. - INPUT_PRE_EXEC_1: | - git config --global url."https://user:${{secrets.PAT_GIT}}@github.com".insteadOf "https://github.com" - # print git configuration - INPUT_PRE_EXEC_2: | - git config --global --list + # - name: Init + # id: init + # uses: gruntwork-io/terragrunt-action@v2.1.1 + # with: + # tf_version: ${{ inputs.TF_VERSION }} + # tg_version: ${{ inputs.TG_VERSION }} + # tg_dir: ${{ inputs.WORKING_DIR }} + # tg_command: 'run-all init' + # env: + # # configure git to use custom token to clone repository. + # INPUT_PRE_EXEC_1: | + # git config --global url."https://user:${{secrets.PAT_GIT}}@github.com".insteadOf "https://github.com" + # # print git configuration + # INPUT_PRE_EXEC_2: | + # git config --global --list + + - run: | + git config --global url."https://user:${{secrets.PAT_GIT}}@github.com".insteadOf "https://github.com" + terragrunt run-all init --terragrunt-working-dir ${{ inputs.WORKING_DIR }} - name: Validate uses: gruntwork-io/terragrunt-action@v2 From 51fe0f46fa772ee2a0d69a2c14b722336044cef3 Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 14:15:28 -0300 Subject: [PATCH 04/24] replace tg --- .github/workflows/iac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index 1a49e00a..a90b5ea6 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -138,7 +138,7 @@ jobs: - name: Install dependencies run: | - + sudo apt update ; sudo apt install wget -yq wget https://github.com/gruntwork-io/terragrunt/releases/download/v0.58.2/terragrunt_linux_amd64 mv terragrunt_linux_amd64 /usr/local/bin/terragrunt chmod u+x /usr/local/bin/terragrunt From 532ab72ae688b086ac96deb86feca48110f8d497 Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 14:17:00 -0300 Subject: [PATCH 05/24] bump ci --- .github/workflows/iac.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index a90b5ea6..055300d5 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -140,8 +140,8 @@ jobs: run: | sudo apt update ; sudo apt install wget -yq wget https://github.com/gruntwork-io/terragrunt/releases/download/v0.58.2/terragrunt_linux_amd64 - mv terragrunt_linux_amd64 /usr/local/bin/terragrunt - chmod u+x /usr/local/bin/terragrunt + sudo mv terragrunt_linux_amd64 /usr/local/bin/terragrunt + sudo chmod u+x /usr/local/bin/terragrunt sudo apt-get update -y sudo apt-get install -y gnupg software-properties-common wget -O- https://apt.releases.hashicorp.com/gpg | \ From 99c6b6e64b7adeee1eb9db89f0084cd372d921a8 Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 14:20:36 -0300 Subject: [PATCH 06/24] debug --- .github/workflows/iac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index 055300d5..37b16f1d 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -209,7 +209,7 @@ jobs: - run: | git config --global url."https://user:${{secrets.PAT_GIT}}@github.com".insteadOf "https://github.com" - terragrunt run-all init --terragrunt-working-dir ${{ inputs.WORKING_DIR }} + sudo terragrunt run-all init --terragrunt-working-dir ${{ inputs.WORKING_DIR }} - name: Validate uses: gruntwork-io/terragrunt-action@v2 From 3cbda219deacab40bca0aab4b01df2d1aa41c377 Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 16:06:48 -0300 Subject: [PATCH 07/24] debug --- .github/workflows/iac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index 37b16f1d..095e3ec5 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -209,7 +209,7 @@ jobs: - run: | git config --global url."https://user:${{secrets.PAT_GIT}}@github.com".insteadOf "https://github.com" - sudo terragrunt run-all init --terragrunt-working-dir ${{ inputs.WORKING_DIR }} + sudo terragrunt run-all init --terragrunt-log-level debug --terragrunt-debug --terragrunt-working-dir ${{ inputs.WORKING_DIR }} - name: Validate uses: gruntwork-io/terragrunt-action@v2 From 11510a73f6fdbbf4494f5a7ee8414c533b3ee6ea Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 16:17:44 -0300 Subject: [PATCH 08/24] debug --- .github/workflows/iac.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index 095e3ec5..b4a07067 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -209,6 +209,7 @@ jobs: - run: | git config --global url."https://user:${{secrets.PAT_GIT}}@github.com".insteadOf "https://github.com" + git init sudo terragrunt run-all init --terragrunt-log-level debug --terragrunt-debug --terragrunt-working-dir ${{ inputs.WORKING_DIR }} - name: Validate From dddc03fa2e2fdc07d1857a11aec64c3dcb69b693 Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 16:21:34 -0300 Subject: [PATCH 09/24] debug --- .github/workflows/iac.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index b4a07067..8a1bbf92 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -110,6 +110,8 @@ jobs: permissions: write-all steps: + - run: sudo apt update ; sudo apt install git -yq ; git config --global --add safe.directory '*' + - name: 'Checkout' uses: actions/checkout@v4 @@ -189,7 +191,7 @@ jobs: - uses: opentofu/setup-opentofu@main - - run: sudo apt update ; sudo apt install git -yq ; git config --global --add safe.directory '*' + # - name: Init # id: init @@ -209,7 +211,7 @@ jobs: - run: | git config --global url."https://user:${{secrets.PAT_GIT}}@github.com".insteadOf "https://github.com" - git init + # git init sudo terragrunt run-all init --terragrunt-log-level debug --terragrunt-debug --terragrunt-working-dir ${{ inputs.WORKING_DIR }} - name: Validate From 64097a17499132a055c26d48b77d2c109504c8a9 Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 16:24:17 -0300 Subject: [PATCH 10/24] debug --- .github/workflows/iac.yml | 66 ++++++++++++--------------------------- 1 file changed, 20 insertions(+), 46 deletions(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index 8a1bbf92..2668def1 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -12,7 +12,7 @@ on: TG_VERSION: required: false type: string - default: '0.58.2' + default: '0.58.5' TF_VERSION: required: false type: string @@ -110,8 +110,9 @@ jobs: permissions: write-all steps: - - run: sudo apt update ; sudo apt install git -yq ; git config --global --add safe.directory '*' - + - name: Install dependencies + run: sudo apt update ; sudo apt install unzip -yq + - name: 'Checkout' uses: actions/checkout@v4 @@ -138,28 +139,6 @@ jobs: project_id: ${{ inputs.PROJECT_ID }} service_account: ${{ inputs.GCP_SA }} - - name: Install dependencies - run: | - sudo apt update ; sudo apt install wget -yq - wget https://github.com/gruntwork-io/terragrunt/releases/download/v0.58.2/terragrunt_linux_amd64 - sudo mv terragrunt_linux_amd64 /usr/local/bin/terragrunt - sudo chmod u+x /usr/local/bin/terragrunt - sudo apt-get update -y - sudo apt-get install -y gnupg software-properties-common - wget -O- https://apt.releases.hashicorp.com/gpg | \ - gpg --dearmor | \ - sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg > /dev/null - gpg --no-default-keyring \ - --keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg \ - --fingerprint - echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \ - https://apt.releases.hashicorp.com $(lsb_release -cs) main" | \ - sudo tee /etc/apt/sources.list.d/hashicorp.list - sudo apt update -y - sudo apt-get install terraform unzip -yq - - - - name: Sops Binary Installer uses: mdgreenwald/mozilla-sops-action@v1.6.0 with: @@ -191,28 +170,23 @@ jobs: - uses: opentofu/setup-opentofu@main - + - run: sudo apt update ; sudo apt install git -yq ; git config --global --add safe.directory '*' - # - name: Init - # id: init - # uses: gruntwork-io/terragrunt-action@v2.1.1 - # with: - # tf_version: ${{ inputs.TF_VERSION }} - # tg_version: ${{ inputs.TG_VERSION }} - # tg_dir: ${{ inputs.WORKING_DIR }} - # tg_command: 'run-all init' - # env: - # # configure git to use custom token to clone repository. - # INPUT_PRE_EXEC_1: | - # git config --global url."https://user:${{secrets.PAT_GIT}}@github.com".insteadOf "https://github.com" - # # print git configuration - # INPUT_PRE_EXEC_2: | - # git config --global --list - - - run: | - git config --global url."https://user:${{secrets.PAT_GIT}}@github.com".insteadOf "https://github.com" - # git init - sudo terragrunt run-all init --terragrunt-log-level debug --terragrunt-debug --terragrunt-working-dir ${{ inputs.WORKING_DIR }} + - name: Init + id: init + uses: gruntwork-io/terragrunt-action@v2.1.1 + with: + tf_version: ${{ inputs.TF_VERSION }} + tg_version: ${{ inputs.TG_VERSION }} + tg_dir: ${{ inputs.WORKING_DIR }} + tg_command: 'run-all init' + env: + # configure git to use custom token to clone repository. + INPUT_PRE_EXEC_1: | + git config --global url."https://user:${{secrets.PAT_GIT}}@github.com".insteadOf "https://github.com" + # print git configuration + INPUT_PRE_EXEC_2: | + git config --global --list - name: Validate uses: gruntwork-io/terragrunt-action@v2 From 0ab0cfdee961a106af08aca76f5fa155bfa1ac11 Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 16:26:09 -0300 Subject: [PATCH 11/24] debug --- .github/workflows/iac.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index 2668def1..00426100 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -12,7 +12,7 @@ on: TG_VERSION: required: false type: string - default: '0.58.5' + default: '0.58.2' TF_VERSION: required: false type: string @@ -112,7 +112,7 @@ jobs: steps: - name: Install dependencies run: sudo apt update ; sudo apt install unzip -yq - + - name: 'Checkout' uses: actions/checkout@v4 From 3ae77b80830f6d76f84fd78bdf3050f5dcf74962 Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 16:29:07 -0300 Subject: [PATCH 12/24] debug --- .github/workflows/iac.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index 00426100..f6072c01 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -111,7 +111,9 @@ jobs: steps: - name: Install dependencies - run: sudo apt update ; sudo apt install unzip -yq + run: | + sudo apt update + sudo apt install unzip git -yq - name: 'Checkout' uses: actions/checkout@v4 @@ -170,8 +172,6 @@ jobs: - uses: opentofu/setup-opentofu@main - - run: sudo apt update ; sudo apt install git -yq ; git config --global --add safe.directory '*' - - name: Init id: init uses: gruntwork-io/terragrunt-action@v2.1.1 From a9a611776069abd37113e2e919df6f099021ae23 Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 16:34:54 -0300 Subject: [PATCH 13/24] debug --- .github/workflows/iac.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index f6072c01..4b13f953 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -272,3 +272,5 @@ jobs: OVH_APPLICATION_SECRET: ${{ secrets.OVH_APPLICATION_SECRET }} OVH_CONSUMER_KEY: ${{ secrets.OVH_CONSUMER_KEY }} OVH_CLOUD_PROJECT_SERVICE: ${{ secrets.OVH_CLOUD_PROJECT_SERVICE }} + + - run: sudo chown -R $USER:$USER /home/github/actions-runner/_work/${{ github.repository }} \ No newline at end of file From 3e425a0aa65e36dead31d702b841b013650073be Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 16:38:04 -0300 Subject: [PATCH 14/24] debug --- .github/workflows/iac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index 4b13f953..f1512595 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -273,4 +273,4 @@ jobs: OVH_CONSUMER_KEY: ${{ secrets.OVH_CONSUMER_KEY }} OVH_CLOUD_PROJECT_SERVICE: ${{ secrets.OVH_CLOUD_PROJECT_SERVICE }} - - run: sudo chown -R $USER:$USER /home/github/actions-runner/_work/${{ github.repository }} \ No newline at end of file + - run: sudo chown -R $USER:$USER /home/github/actions-runner/_work/${{ github.repository.name }} \ No newline at end of file From 9cfefcbfc63da52377e5bea12e0fa2bd68d0a46e Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 16:40:54 -0300 Subject: [PATCH 15/24] debug --- .github/workflows/iac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index f1512595..e2a221b2 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -273,4 +273,4 @@ jobs: OVH_CONSUMER_KEY: ${{ secrets.OVH_CONSUMER_KEY }} OVH_CLOUD_PROJECT_SERVICE: ${{ secrets.OVH_CLOUD_PROJECT_SERVICE }} - - run: sudo chown -R $USER:$USER /home/github/actions-runner/_work/${{ github.repository.name }} \ No newline at end of file + - run: sudo chown -R $USER:$USER /home/github/_work/${{ github.repository.name }} \ No newline at end of file From 2198c07f33a647d8d59ecc49aef49821af2d9c50 Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 16:44:58 -0300 Subject: [PATCH 16/24] debug --- .github/workflows/iac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index e2a221b2..79d44458 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -273,4 +273,4 @@ jobs: OVH_CONSUMER_KEY: ${{ secrets.OVH_CONSUMER_KEY }} OVH_CLOUD_PROJECT_SERVICE: ${{ secrets.OVH_CLOUD_PROJECT_SERVICE }} - - run: sudo chown -R $USER:$USER /home/github/_work/${{ github.repository.name }} \ No newline at end of file + - run: sudo chown -R $USER:$USER /home/runner/_work/${{ github.event.repository.name }} \ No newline at end of file From dd39cdea72899cc14428aa0acfc8c2dfd936043e Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 16:53:23 -0300 Subject: [PATCH 17/24] bump ci From 21c0a3977c09432c26f84f254b345cb802be062d Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 16:53:27 -0300 Subject: [PATCH 18/24] debug --- .github/workflows/iac.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index 79d44458..772fb9e7 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -107,7 +107,9 @@ jobs: environment: name: ${{ inputs.ENVIRONMENT }} - permissions: write-all + permissions: + contents: 'read' + id-token: 'write' steps: - name: Install dependencies From 534ed8b19a24d1661f120e30a9532560274beeb0 Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 17:02:24 -0300 Subject: [PATCH 19/24] debug --- .github/workflows/iac.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index 772fb9e7..01067244 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -116,6 +116,9 @@ jobs: run: | sudo apt update sudo apt install unzip git -yq + + - name: cleanup old checkout + run: chmod +w -R ${GITHUB_WORKSPACE}; rm -rf ${GITHUB_WORKSPACE}/*; - name: 'Checkout' uses: actions/checkout@v4 @@ -275,4 +278,4 @@ jobs: OVH_CONSUMER_KEY: ${{ secrets.OVH_CONSUMER_KEY }} OVH_CLOUD_PROJECT_SERVICE: ${{ secrets.OVH_CLOUD_PROJECT_SERVICE }} - - run: sudo chown -R $USER:$USER /home/runner/_work/${{ github.event.repository.name }} \ No newline at end of file + # - run: sudo chown -R $USER:$USER /home/runner/_work/${{ github.event.repository.name }} \ No newline at end of file From 0e6cc76b696c8fff19d212c9561d81d5e90532fd Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 17:26:32 -0300 Subject: [PATCH 20/24] debug --- .github/workflows/iac.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index 01067244..7fdffc1a 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -117,19 +117,19 @@ jobs: sudo apt update sudo apt install unzip git -yq + + - name: 'Checkout' + uses: actions/checkout@v4 + + - name: Checkout actions + uses: actions/checkout@v4 + with: + repository: signalwire/actions-template + ref: main + path: actions + - name: cleanup old checkout run: chmod +w -R ${GITHUB_WORKSPACE}; rm -rf ${GITHUB_WORKSPACE}/*; - - - name: 'Checkout' - uses: actions/checkout@v4 - - - name: Checkout actions - uses: actions/checkout@v4 - with: - repository: signalwire/actions-template - ref: main - path: actions - - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4.0.2 with: From 1923eb1bb65671a015cb934e44729e08b1e71fdc Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 17:28:26 -0300 Subject: [PATCH 21/24] debug --- .github/workflows/iac.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index 7fdffc1a..94424449 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -118,15 +118,15 @@ jobs: sudo apt install unzip git -yq - - name: 'Checkout' - uses: actions/checkout@v4 - - - name: Checkout actions - uses: actions/checkout@v4 - with: - repository: signalwire/actions-template - ref: main - path: actions + - name: 'Checkout' + uses: actions/checkout@v4 + + - name: Checkout actions + uses: actions/checkout@v4 + with: + repository: signalwire/actions-template + ref: main + path: actions - name: cleanup old checkout run: chmod +w -R ${GITHUB_WORKSPACE}; rm -rf ${GITHUB_WORKSPACE}/*; From 3775e3f792f52021d20a23f865126ef0e4b5e8ae Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 17:30:32 -0300 Subject: [PATCH 22/24] debug --- .github/workflows/iac.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index 94424449..0ae69270 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -117,6 +117,8 @@ jobs: sudo apt update sudo apt install unzip git -yq + - name: cleanup old checkout + run: chmod +w -R ${GITHUB_WORKSPACE}; rm -rf ${GITHUB_WORKSPACE}/*; - name: 'Checkout' uses: actions/checkout@v4 @@ -128,8 +130,6 @@ jobs: ref: main path: actions - - name: cleanup old checkout - run: chmod +w -R ${GITHUB_WORKSPACE}; rm -rf ${GITHUB_WORKSPACE}/*; - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4.0.2 with: From 8ce60916bbf763a2f25c5ed335a8667e5793529a Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 17:37:15 -0300 Subject: [PATCH 23/24] debug --- .github/workflows/iac.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index 0ae69270..e15f001c 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -278,4 +278,4 @@ jobs: OVH_CONSUMER_KEY: ${{ secrets.OVH_CONSUMER_KEY }} OVH_CLOUD_PROJECT_SERVICE: ${{ secrets.OVH_CLOUD_PROJECT_SERVICE }} - # - run: sudo chown -R $USER:$USER /home/runner/_work/${{ github.event.repository.name }} \ No newline at end of file + - run: sudo chmod -R 777 /home/runner/_work/${{ github.event.repository.name }} \ No newline at end of file From 6cf4b31d95f11d2784b9740f84210ce5f6c4c8e6 Mon Sep 17 00:00:00 2001 From: Lucas Mellos Carlos Date: Fri, 3 May 2024 17:55:56 -0300 Subject: [PATCH 24/24] debug --- .github/workflows/iac.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/iac.yml b/.github/workflows/iac.yml index e15f001c..e18d3f39 100644 --- a/.github/workflows/iac.yml +++ b/.github/workflows/iac.yml @@ -207,6 +207,7 @@ jobs: - name: Plan uses: gruntwork-io/terragrunt-action@v2 id: plan + continue-on-error: true with: tf_version: ${{ inputs.TF_VERSION }} tg_version: ${{ inputs.TG_VERSION }} @@ -231,10 +232,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}} # TF_LOG: trace - - name: Terraform Plan Status - if: steps.plan.outcome == 'failure' - run: exit 1 - - name: Generate token id: generate_token uses: tibdex/github-app-token@v2