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

actions/checkout is checking out the wrong SHA #49

Closed
jwalton opened this issue Sep 30, 2019 · 10 comments
Closed

actions/checkout is checking out the wrong SHA #49

jwalton opened this issue Sep 30, 2019 · 10 comments

Comments

@jwalton
Copy link

jwalton commented Sep 30, 2019

Note the SHA at the top of my build:

image

But this is the output from the end of actions/checkout:

 HEAD is now at c28ff3a5b fix: Use React 16.9.0.
Removed matchers: 'checkout-git'
##[remove-matcher owner=checkout-git]

It seems to be checking out the latest master, instead of the branch I'm actually on. This was working on Saturday.

@jwalton
Copy link
Author

jwalton commented Sep 30, 2019

Actually, I think perhaps something more fundamental is broken here:

      - run: 'echo Sha is: $SHA'
        env:
          SHA: ${{ github.sha }}

results in:

Sha is:

Where's my sha? O_o

@jwalton
Copy link
Author

jwalton commented Sep 30, 2019

The default $GITHUB_SHA is also empty.

@nulano
Copy link

nulano commented Sep 30, 2019

Even the ref is missing! Running cmd /c "set" on Windows gives:

[...]
GITHUB_BASE_REF=
GITHUB_EVENT_NAME=push
GITHUB_EVENT_PATH=d:\a\_temp\_github_workflow\event.json
GITHUB_HEAD_REF=
GITHUB_REF=
GITHUB_REPOSITORY=nulano/Pillow
GITHUB_SHA=
[...]

This broke about an hour ago.

@nulano
Copy link

nulano commented Sep 30, 2019

Reported here as well: https://github.community/t5/GitHub-Actions/GITHUB-REF-and-GITHUB-SHA-no-longer-work/m-p/33283/highlight/true#M1439

@jwalton
Copy link
Author

jwalton commented Sep 30, 2019

@nulano I beat you to it by a minute, I'm afraid: https://github.community/t5/GitHub-Actions/PSA-GitHub-Actions-are-a-bit-broken-this-morning-missing-SHAs/m-p/33282#M1438 ;)

@TingluoHuang
Copy link
Member

ACK

@timruffles
Copy link

We have deployed a fix for this. Sorry! 😓 @jwalton how is it looking for you?

@nulano
Copy link

nulano commented Sep 30, 2019

Looks OK for me now.

@jwalton
Copy link
Author

jwalton commented Sep 30, 2019

@timruffles Working for me now! Don't worry, you're still beta, you can break stuff. ;) Thanks for the quick fix!

@rela589n
Copy link

It seems that currently it doesn't work.

- name: Build docker images
        run: |
          $tag = '${{ env.GITHUB_SHA }}' | cut --characters=1-15

Results in:

 $tag = '' | cut --characters=1-15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants