Skip to content

Commit ca3840c

Browse files
committed
ci(github-creds): Add action to load GitHub release token from 1Password
1 parent 8ecb208 commit ca3840c

2 files changed

Lines changed: 44 additions & 0 deletions

File tree

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,20 @@ Outputs:
8787
- `docker_username`
8888
- `docker_password`
8989

90+
### github-creds
91+
92+
Path: `github-creds`
93+
94+
Loads GitHub release token from 1Password.
95+
96+
Inputs:
97+
98+
- `op_service_account_token` (required): 1Password service account token.
99+
100+
Outputs:
101+
102+
- `github_release_token`
103+
90104
### git-commit-push
91105

92106
Path: `git-commit-push`
@@ -124,6 +138,12 @@ jobs:
124138
uses: gittools/cicd/dockerhub-creds@v1
125139
with:
126140
op_service_account_token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
141+
142+
- name: Load GitHub release token
143+
id: github
144+
uses: gittools/cicd/github-creds@v1
145+
with:
146+
op_service_account_token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
127147
```
128148
129149
## Notes

github-creds/action.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: 'Load GitHub Secrets'
2+
description: 'Loads GitHub credentials from 1Password'
3+
4+
inputs:
5+
op_service_account_token:
6+
description: '1Password service account token'
7+
required: true
8+
9+
outputs:
10+
github_release_token:
11+
description: GitHub release token
12+
value: ${{ steps.load.outputs.github_release_token }}
13+
14+
runs:
15+
using: 'composite'
16+
steps:
17+
- name: Load secrets from 1Password
18+
id: load
19+
uses: 1password/load-secrets-action@v3
20+
with:
21+
export-env: false
22+
env:
23+
OP_SERVICE_ACCOUNT_TOKEN: ${{ inputs.op_service_account_token }}
24+
github_release_token: op://gittools/ci/github/release_token

0 commit comments

Comments
 (0)