✨ 更新 Gitea 发布工作流,修改触发事件为 repository_dispatch 并添加 GITEA_API_URL 环境变量
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
name: Changelog
|
||||
|
||||
on:
|
||||
release:
|
||||
repository_dispatch:
|
||||
types:
|
||||
- created
|
||||
- generate_changelog
|
||||
|
||||
jobs:
|
||||
changelog:
|
||||
runs-on: liteyukios-latest
|
||||
|
20
.github/workflows/liteyuki-gitea-release.yaml
vendored
20
.github/workflows/liteyuki-gitea-release.yaml
vendored
@ -5,6 +5,9 @@ on:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
env:
|
||||
GITEA_API_URL: https://git.liteyuki.icu/api/v1 # 替换为你的 Gitea API 地址
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: liteyukios-latest
|
||||
@ -18,11 +21,9 @@ jobs:
|
||||
- name: Create Gitea Release
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.LITEYUKI_GITEA_TOKEN }}
|
||||
GITEA_API_URL: https://git.liteyuki.icu/api/v1 # 替换为你的 Gitea API 地址
|
||||
run: |
|
||||
TAG_NAME=$(echo $GITHUB_REF | sed 's/refs\/tags\///')
|
||||
echo 'AAA ${{ github.repository }} ${{ github.repository_owner }} ${{ github.event.repository.name }}'
|
||||
curl -X POST "$GITEA_API_URL/repos/bot/yukilog/releases" \
|
||||
curl -X POST "$GITEA_API_URL/repos/${{ github.repository }}/releases" \
|
||||
-H "Authorization: token $GITEA_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
@ -32,4 +33,15 @@ jobs:
|
||||
"body": "'"waiting..."'",
|
||||
"draft": false,
|
||||
"prerelease": false
|
||||
}'
|
||||
}'
|
||||
|
||||
|
||||
- name: Trigger Changelog Workflow
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
curl -X POST \
|
||||
-H "Authorization: token $GITHUB_TOKEN" \
|
||||
-H "Accept: application/vnd.github.everest-preview+json" \
|
||||
$GITEA_API_URL/repos/${{ github.repository }}/dispatches \
|
||||
-d '{"event_type": "generate_changelog"}'
|
Reference in New Issue
Block a user