Skip to content

Commit e48f903

Browse files
authored
Add release bot workflow for trufflehog releases (trufflesecurity#4835)
Triggers on release publish events to run the release bot, which generates release notes using GitHub, Jira, and AI services. Adapted from the thog repo workflow with trufflehog-specific adjustments: repository argument set to trufflehog, environment requirement removed in favor of a repo-level secret, permissions restricted, and a fork guard added for consistency with other trufflehog workflows. Made-with: Cursor
1 parent 6bd2d14 commit e48f903

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/release-bot.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Run release bot
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
permissions: {}
8+
9+
jobs:
10+
run:
11+
if: ${{ github.repository == 'trufflesecurity/trufflehog' }}
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Login to GCP
16+
id: auth
17+
uses: "google-github-actions/auth@v2"
18+
with:
19+
credentials_json: ${{ secrets.GCP_SA_TRUFFLE_RELEASE_BOT }}
20+
21+
- name: Login to GAR
22+
uses: docker/login-action@v3
23+
with:
24+
registry: us-central1-docker.pkg.dev
25+
username: _json_key
26+
password: ${{ secrets.GCP_SA_TRUFFLE_RELEASE_BOT }}
27+
28+
- name: Run release bot
29+
env:
30+
RELEASE_TAG: ${{ github.event.release.tag_name }}
31+
run: |
32+
docker run \
33+
-e GOOGLE_APPLICATION_CREDENTIALS=/tmp/keys/GCP_SA_TRUFFLE_RELEASE_BOT.json \
34+
-v ${{ steps.auth.outputs.credentials_file_path }}:/tmp/keys/GCP_SA_TRUFFLE_RELEASE_BOT.json:ro \
35+
us-central1-docker.pkg.dev/truffle-release-bot/releases/bot:latest \
36+
--repository trufflehog "$RELEASE_TAG"

0 commit comments

Comments
 (0)