File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,10 @@ inputs:
2929 description : ' [Internal] The location to store the mutex repo'
3030 required : false
3131 default : ' /run/gh-action-mutex/repo'
32+ ticket-id-suffix :
33+ description : ' Ticket id suffix to avoid identical values for parallel/matrix jobs in the same workflow run'
34+ required : false
35+ default : ' default'
3236runs :
3337 using : ' docker'
3438 image : ' Dockerfile'
3943 ARG_REPOSITORY : ${{ inputs.repository }}
4044 ARG_REPO_TOKEN : ${{ inputs.repo-token }}
4145 ARG_DEBUG : ${{ inputs.debug }}
46+ ARG_TICKET_ID_SUFFIX : ${{ inputs.ticket-id-suffix}}
4247 entrypoint : ' /scripts/lock.sh'
4348 post-entrypoint : ' /scripts/unlock.sh'
4449
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ cd "$ARG_CHECKOUT_LOCATION"
1515
1616__mutex_queue_file=mutex_queue
1717__repo_url=" https://x-access-token:$ARG_REPO_TOKEN @$ARG_GITHUB_SERVER /$ARG_REPOSITORY "
18- __ticket_id=" $GITHUB_RUN_ID -$( date +%s) -$(( $RANDOM % 1000 )) "
18+ __ticket_id=" $GITHUB_RUN_ID -$( date +%s) -$(( $RANDOM % 1000 )) - $ARG_TICKET_ID_SUFFIX "
1919echo " ticket_id=$__ticket_id " >> $GITHUB_STATE
2020
2121set_up_repo " $__repo_url "
You can’t perform that action at this time.
0 commit comments