Hi,
I use PR comment commands like /publish with github actions, and as you might know that workflows triggered on issue_comment started from the default branch (master in my case), thus the
https://github.com/dotnet/Nerdbank.GitVersioning/blob/85241588765ce921ac50132841dee932fab3956e/src/NerdBank.GitVersioning/CloudBuildServices/GitHubActions.cs#L23
works wrong.
I have something like this in workflow:
- name: git checkout / on 'workflow_call'
if: ${{ inputs.ref != '' }}
uses: actions/checkout@v3
with:
clean: false
# branch name
ref: ${{ inputs.ref }}
fetch-depth: 0
...
- name: Generate version variables
id: nbgv
uses: dotnet/nbgv@master
with:
setAllVars: true
And I can't do something like echo "GITHUB_REF=refs/heads/$branch" >> $GITHUB_ENV because:
If you attempt to override the value of one of these default environment variables, the assignment is ignored.
Docs
So I can't override the wrong GITHUB_REFvalue and because of that nbgv step generates wrong version info.
Do you have any ideas how to beat this?
cc: @AArnott
Hi,
I use PR comment commands like
/publishwith github actions, and as you might know that workflows triggered onissue_commentstarted from the default branch (masterin my case), thus thehttps://github.com/dotnet/Nerdbank.GitVersioning/blob/85241588765ce921ac50132841dee932fab3956e/src/NerdBank.GitVersioning/CloudBuildServices/GitHubActions.cs#L23
works wrong.
I have something like this in workflow:
And I can't do something like
echo "GITHUB_REF=refs/heads/$branch" >> $GITHUB_ENVbecause:Docs
So I can't override the wrong
GITHUB_REFvalue and because of that nbgv step generates wrong version info.Do you have any ideas how to beat this?
cc: @AArnott