Skip to content

Commit 8b94408

Browse files
committed
Add workflow to test automated signed commits
1 parent 039b43f commit 8b94408

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/commit-tests.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Signed commits tests
2+
3+
on:
4+
push:
5+
branches:
6+
- gh-app-tests
7+
8+
jobs:
9+
commit:
10+
name: Generate resources
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout source code
14+
uses: actions/checkout@v4
15+
16+
- name: Load app secrets from vault
17+
uses: rancher-eio/read-vault-secrets@main
18+
id: load-token
19+
with:
20+
secrets: |
21+
secret/data/github/repo/${{ github.repository }}/github/app-credentials appId | APP_ID;
22+
secret/data/github/repo/${{ github.repository }}/github/app-credentials privateKey | PRIVATE_KEY
23+
24+
- name: Generate GH token from GH App secrets
25+
id: create-token
26+
uses: actions/create-github-app-token@v2
27+
with:
28+
app-id: ${{ env.APP_ID }}
29+
private-key: ${{ env.PRIVATE_KEY }}
30+
31+
- name: Generate empty commit
32+
id: generate-images
33+
env:
34+
GH_TOKEN: ${{ steps.create-token.outputs.token }}
35+
run: |
36+
gh auth setup-git
37+
git commit --allow-empty -m "Signed commit test"
38+
git push origin gh-app-tests

0 commit comments

Comments
 (0)