Skip to content

Commit d1861fb

Browse files
zaunistclaude
andcommitted
ci: optimize docker build trigger and add hitokoto to release name
- Change docker-build.yml trigger from push-to-main to release-published and workflow_dispatch for more controlled builds - Add hitokoto API integration to release workflow for dynamic release names Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent c9cc431 commit d1861fb

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.github/workflows/docker-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Docker image build
22

33
on:
4-
push:
5-
branches:
6-
- 'main'
4+
release:
5+
types: [published]
6+
workflow_dispatch:
77

88
jobs:
99
docker:

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ jobs:
1212
with:
1313
fetch-depth: 0
1414

15+
- name: Get Hitokoto
16+
id: hitokoto
17+
run: |
18+
HITOKOTO=$(curl -s 'https://v1.hitokoto.cn/' | jq -r '.hitokoto')
19+
echo "sentence=$HITOKOTO" >> $GITHUB_OUTPUT
20+
1521
- name: Generate Changelog
1622
id: changelog
1723
run: |
@@ -46,7 +52,7 @@ jobs:
4652
token: ${{ secrets.TOKEN }}
4753
generate_release_notes: true
4854
tag_name: ${{ github.ref_name }}
49-
name: ${{ github.ref_name }}
55+
name: ${{ github.ref_name }} - ${{ steps.hitokoto.outputs.sentence }}
5056
body: |
5157
${{ github.event.head_commit.message }}
5258

0 commit comments

Comments
 (0)