Open
Description
Hi.
After checking out two repositories, I'm trying to access the ref
and commit
outputs.
- name: 'Checkout repository 1'
id: 'checkout1'
uses: 'actions/checkout@v4.2.1'
with:
path: 'repository1'
- name: 'Checkout repository 2'
id: 'checkout2'
uses: 'actions/checkout@v4.2.1'
with:
repository: 'Organization/another-repository'
ref: 'development'
token: '${{ secrets.PERSONAL_ACCESS_TOKEN }}'
path: 'repository2'
- name: 'Print output'
run: |
Write-Output "Checkout 1 ref: ${{ steps.checkout1.outputs.ref }}"
Write-Output "Checkout 1 commit: ${{ steps.checkout1.outputs.commit }}"
Write-Output "Checkout 2 ref: ${{ steps.checkout2.outputs.ref }}"
Write-Output "Checkout 2 commit: ${{ steps.checkout2.outputs.commit }}"
shell: 'pwsh'
After executing the workflow, the commit
output is empty in both steps.
Checkout 1 ref: refs/heads/development
Checkout 1 commit:
Checkout 2 ref: development
Checkout 2 commit:
This doesn't seem to be an issue in the test-output
job in .github/workflows/test.yml
Also, the ref
output in checkout2
doesn't show the full name of the branch.
The workflow is executed by a self-hosted runner on Windows Server.
Thanks in advance for your time.