File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -147,3 +147,42 @@ jobs:
147147 fail_on_unmatched_files : false
148148 env :
149149 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
150+
151+ # 문서 저장소 업데이트 트리거
152+ trigger-docs-update :
153+ name : Trigger Docs Update
154+ runs-on : ubuntu-latest
155+ needs : create-release
156+
157+ steps :
158+ - uses : actions/checkout@v4
159+ with :
160+ fetch-depth : 0
161+
162+ - name : Get last 5 tags
163+ id : tags
164+ run : |
165+ TAGS=$(git tag --sort=-v:refname | head -5 | tr '\n' ',')
166+ BASE_TAG=$(git tag --sort=-v:refname | sed -n '6p')
167+ if [ -z "$BASE_TAG" ]; then
168+ BASE_TAG=$(git rev-list --max-parents=0 HEAD)
169+ fi
170+ echo "tags=$TAGS" >> $GITHUB_OUTPUT
171+ echo "base_tag=$BASE_TAG" >> $GITHUB_OUTPUT
172+
173+ - name : Get changed files (last 5 releases)
174+ id : changed
175+ run : |
176+ FILES=$(git diff ${{ steps.tags.outputs.base_tag }}..HEAD --name-only | tr '\n' ',')
177+ echo "files=$FILES" >> $GITHUB_OUTPUT
178+
179+ - name : Trigger docs workflow
180+ run : |
181+ gh workflow run sync-release.yml \
182+ --repo type-ruby/t-ruby.github.io \
183+ --field version=${GITHUB_REF#refs/tags/v} \
184+ --field base_tag=${{ steps.tags.outputs.base_tag }} \
185+ --field recent_tags="${{ steps.tags.outputs.tags }}" \
186+ --field changed_files="${{ steps.changed.outputs.files }}"
187+ env :
188+ GH_TOKEN : ${{ secrets.CROSS_REPO_PAT }}
You can’t perform that action at this time.
0 commit comments