Skip to content

Commit e43afea

Browse files
committed
refactor: include run ID in branch name + commit msg
1 parent bc8e501 commit e43afea

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/rename-module.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,14 @@ jobs:
4949

5050
- name: Set variables
5151
id: vars
52-
# Including hashes of both the source and the workflow file makes this
53-
# idempotent.
5452
env:
5553
RENAME_TO: ${{ steps.go.outputs.MODULE_SUFFIX == 'ava-labs/libevm' && 'ethereum/go-ethereum' || 'ava-labs/libevm' }}
5654
run: |
5755
echo "RENAME_FROM=${{ steps.go.outputs.MODULE_SUFFIX}}" >> "$GITHUB_OUTPUT";
5856
echo "RENAME_TO=${RENAME_TO}" >> "$GITHUB_OUTPUT";
5957
echo "WORKFLOW_HASH=${WORKFLOW_HASH}" >> "$GITHUB_OUTPUT";
6058
echo "SOURCE_COMMIT=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT";
61-
echo "AUTO_BRANCH_NAME=auto/rename-module/to=${RENAME_TO}/src=$(git rev-parse HEAD)/workflow_sha=${{ github.workflow_sha }}" \
59+
echo "AUTO_BRANCH_NAME=auto/rename-module/to=${RENAME_TO}/src=$(git rev-parse HEAD)/workflow_sha=${{ github.workflow_sha }}/run=${{ github.run_id }}" \
6260
>> "$GITHUB_OUTPUT";
6361
6462
- name: Globally rename module from ${{ steps.vars.outputs.RENAME_FROM }} to ${{ steps.vars.outputs.RENAME_TO }}
@@ -91,7 +89,7 @@ jobs:
9189
9290
- name: Set branch name
9391
id: branch
94-
env:
92+
env:
9593
BRANCH: ${{ inputs.branch || steps.vars.outputs.AUTO_BRANCH_NAME }}
9694
run: echo "NAME=${BRANCH}" >> "$GITHUB_OUTPUT";
9795

@@ -113,5 +111,6 @@ jobs:
113111
114112
Source: ${{ steps.vars.outputs.SOURCE_COMMIT }} (${{ inputs.source }})
115113
Workflow: ${{ github.workflow_sha }} (${{ github.workflow_ref }})
114+
Run ID: ${{ github.run_id }}
116115
repo: ${{ github.repository }}
117116
branch: ${{ steps.branch.outputs.NAME }}

0 commit comments

Comments
 (0)