Skip to content

Commit

Permalink
chore: Update github secrets keys
Browse files Browse the repository at this point in the history
  • Loading branch information
sudosubin committed Oct 13, 2023
1 parent 0517ee0 commit 8655b4a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/opentofu-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
id: create-github-app-token
with:
app-id: ${{ secrets.ACTIONS_PYTHON_CI_APP_ID }}
private-key: ${{ secrets.ACTIONS_PYTHON_CI_PRIVATE_KEY }}
private-key: ${{ secrets.ACTIONS_PYTHON_CI_APP_PEM_FILE }}

- uses: actions/checkout@v4
with:
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/opentofu-tfcmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
id: create-github-app-token
with:
app-id: ${{ secrets.ACTIONS_PYTHON_CI_APP_ID }}
private-key: ${{ secrets.ACTIONS_PYTHON_CI_PRIVATE_KEY }}
private-key: ${{ secrets.ACTIONS_PYTHON_CI_APP_PEM_FILE }}

- uses: kislerdm/setup-opentofu@main
with:
Expand All @@ -47,7 +47,11 @@ jobs:
-repo ${{ github.event.repository.name }} \
-pr ${{ github.event.pull_request.number }} \
-var "target:${{ matrix.module }}" \
plan -patch -- tofu plan -no-color
plan -patch -- tofu plan -no-color \
-var "app_terraform_io_token=${{ secrets.APP_TERRAFORM_IO_TOKEN }}" \
-var "github_provider_app_id=${{ secrets.ACTIONS_PYTHON_CI_APP_ID }}" \
-var "github_provider_app_installation_id=${{ secrets.ACTIONS_PYTHON_CI_APP_INSTALLATION_ID }}" \
-var "github_provider_app_pem_file=${{ secrets.ACTIONS_PYTHON_CI_APP_PEM_FILE }}"
env:
GITHUB_TOKEN: ${{ steps.create-github-app-token.outputs.token }}
working-directory: ${{ matrix.module }}
Expand All @@ -68,7 +72,7 @@ jobs:
id: create-github-app-token
with:
app-id: ${{ secrets.ACTIONS_PYTHON_CI_APP_ID }}
private-key: ${{ secrets.ACTIONS_PYTHON_CI_PRIVATE_KEY }}
private-key: ${{ secrets.ACTIONS_PYTHON_CI_APP_PEM_FILE }}

- uses: kislerdm/setup-opentofu@main
with:
Expand All @@ -90,7 +94,11 @@ jobs:
-repo ${{ github.event.repository.name }} \
-sha ${{ github.sha }} \
-var "target:${{ matrix.module }}" \
apply -- tofu apply -auto-approve
apply -- tofu apply -auto-approve \
-var "app_terraform_io_token=${{ secrets.APP_TERRAFORM_IO_TOKEN }}" \
-var "github_provider_app_id=${{ secrets.ACTIONS_PYTHON_CI_APP_ID }}" \
-var "github_provider_app_installation_id=${{ secrets.ACTIONS_PYTHON_CI_APP_INSTALLATION_ID }}" \
-var "github_provider_app_pem_file=${{ secrets.ACTIONS_PYTHON_CI_APP_PEM_FILE }}"
env:
GITHUB_TOKEN: ${{ steps.create-github-app-token.outputs.token }}
working-directory: ${{ matrix.module }}
5 changes: 3 additions & 2 deletions github/nested_repos.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ module "github_repository_infra" {
]

secrets = [
{ name = "APP_TERRAFORM_IO_TOKEN", value = var.app_terraform_io_token },
{ name = "ACTIONS_PYTHON_CI_APP_ID", value = var.github_provider_app_id },
{ name = "ACTIONS_PYTHON_CI_PRIVATE_KEY", value = var.github_provider_app_pem_file },
{ name = "ACTIONS_PYTHON_CI_APP_INSTALLATION_ID", value = var.github_provider_app_installation_id },
{ name = "ACTIONS_PYTHON_CI_APP_PEM_FILE", value = var.github_provider_app_pem_file },
{ name = "APP_TERRAFORM_IO_TOKEN", value = var.app_terraform_io_token },
]
}

Expand Down

0 comments on commit 8655b4a

Please sign in to comment.