Skip to content

Commit 7a928b0

Browse files
committed
Fix version visibility: use static run-name, remove unsupported gh api call
GitHub REST API does not support PATCH to update workflow run display name. Replace with static run-name property and keep step summary for version details. Made-with: Cursor
1 parent aab67db commit 7a928b0

1 file changed

Lines changed: 7 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ on:
77
branches: [main]
88
workflow_dispatch:
99

10+
run-name: >-
11+
${{
12+
github.event_name == 'pull_request'
13+
&& format('PR #{0} · {1}', github.event.pull_request.number, github.head_ref)
14+
|| format('{0} #{1}', github.ref_name, github.run_number)
15+
}}
16+
1017
permissions:
1118
contents: read
1219

@@ -26,9 +33,6 @@ jobs:
2633
name: Resolve Version
2734
runs-on: ubuntu-latest
2835
timeout-minutes: 5
29-
permissions:
30-
actions: write
31-
contents: read
3236
outputs:
3337
version: ${{ steps.resolve.outputs.version }}
3438
tag: ${{ steps.resolve.outputs.tag }}
@@ -74,8 +78,6 @@ jobs:
7478
7579
- name: Version summary
7680
shell: bash
77-
env:
78-
GH_TOKEN: ${{ github.token }}
7981
run: |
8082
VERSION="${{ steps.resolve.outputs.version }}"
8183
IS_RELEASE="${{ steps.resolve.outputs.is_release }}"
@@ -102,15 +104,6 @@ jobs:
102104
BUMP="INITIAL"
103105
fi
104106
105-
if [ "$IS_RELEASE" = "true" ]; then
106-
RUN_NAME="v${VERSION} (${BUMP}) #${{ github.run_number }}"
107-
else
108-
RUN_NAME="v${VERSION}-ci.${{ github.run_number }} (${BUMP}) PR"
109-
fi
110-
111-
gh api -X PATCH "/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
112-
-f "name=$RUN_NAME" || echo "::warning::Failed to update run name"
113-
114107
MODE=$( [ "$IS_RELEASE" = "true" ] && echo "Release" || echo "CI" )
115108
116109
{

0 commit comments

Comments
 (0)