Skip to content

Support pushing #17

Description

@msqr1

Hi there! First, thank you for making this awesome action, it runs a lot faster than the actions/checkout and most importantly it doesn't need Node.js! However, for my use case, I have a continuous tag where I upload my Debug builds to, and I build them on every push. And so to prevent the tag from falling behind, after uploading the builds, I always run:

git tag -f continuous
git push -f origin continuous

to update the continuous tag to the current commit. This worked with actions/checkout, but not with taiki-e/checkout-action. The error I'm getting is:

fatal: Cannot prompt because user interactivity has been disabled.
bash: line 1: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com/': No such file or directory

I think it's because actions/checkout set up authorization with ${{ github.token }} when cloning by default and remove it with the cleanup step. But for our case I think we should only do it when the user specify the token input. Instead of just adding the remote we can do:

git remote add origin https://[TOKEN]@github.com/${{ github.repository }}

to authenticate and allow pushing (and other authenticated git commands), too. For now I'm just going to run the above command after checking out since I don't need cleanup. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-questionCategory: A question

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions