actions / actions/checkout

Fail step if ref has typos

Open
#693 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
8.9k
Forks
2.8k
PR merge metrics
No merged PRs in 30d

Description

Hi,

I have step like this:

    - name: Checkout app repo
      uses: actions/checkout@v2
      with:
        repository: 'whatever'
        ref: '${{ env.REF }}'
        token: 'whatever'

The $REF is from user input, when user inputs a wrong REF, the step won't fail but pull default branch instead, is it able to fail the step if a wrong ref there? Thanks.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the checkout workflow with an invalid ref supplied through env.REF and inspect how the action resolves that ref. Done means a nonexistent ref causes the step to fail instead of checking out the default branch.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
ci-cd, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.