Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions actions/create-workflow-token/action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: 'Create workflow token'
description: 'Create an app token, with fallback to $\{{ github.token }}'
inputs:
app-id:
description: 'The GitHub App ID'
client-id:
description: 'The GitHub App Client ID'
required: false
private-key:
description: 'The GitHub App private key (PEM format)'
Expand All @@ -21,7 +21,7 @@ runs:
continue-on-error: true
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
with:
app-id: ${{ inputs.app-id }}
client-id: ${{ inputs.client-id }}
private-key: ${{ inputs.private-key }}
- name: Set output
id: output
Expand Down
7 changes: 7 additions & 0 deletions tf/deployment/modules/shared/github/secrets/secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ data "onepassword_item" "push_o_matic_app" {
locals {
push_o_matic_fields = {
app_id = [for field in data.onepassword_item.push_o_matic_app.section[0].field : field.value if field.label == "app_id"][0]
client_id = [for field in data.onepassword_item.push_o_matic_app.section[0].field : field.value if field.label == "client_id"][0]
installation_id = [for field in data.onepassword_item.push_o_matic_app.section[0].field : field.value if field.label == "installation_id"][0]
}
}
Expand Down Expand Up @@ -87,6 +88,12 @@ import {
id = "PUSH_O_MATIC_APP_KEY"
}

resource "github_actions_organization_secret" "push_o_matic_app_client_id" {
secret_name = "PUSH_O_MATIC_APP_CLIENT_ID"
plaintext_value = local.push_o_matic_fields.client_id
visibility = "all"
}

resource "github_actions_organization_secret" "docker_hub_read_token" {
secret_name = "DOCKER_HUB_READ_TOKEN"
plaintext_value = data.terraform_remote_state.docker_org_state.outputs.read_token
Expand Down
Loading