Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The commit output is empty #1950

Open
manfredo-sanchez opened this issue Oct 21, 2024 · 2 comments
Open

The commit output is empty #1950

manfredo-sanchez opened this issue Oct 21, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@manfredo-sanchez
Copy link

Hi.

After checking out two repositories, I'm trying to access the ref and commit outputs.

  - name: 'Checkout repository 1'
    id: 'checkout1'
    uses: 'actions/[email protected]'
    with:
      path: 'repository1'

  - name: 'Checkout repository 2'
    id: 'checkout2'
    uses: 'actions/[email protected]'
    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.

@liias
Copy link

liias commented Oct 28, 2024

Does it work with a single repository job?

@joshmgross joshmgross added the bug Something isn't working label Nov 5, 2024
@ringin31
Copy link

why bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants