Skip to content

GitHub Actions: Execute a script file without checkout #26359

Answered by airtower-luna
cwdbox asked this question in Actions
Discussion options

You must be logged in to vote

Not as script files, no, you’ll only have access to that after checkout. What’s the issue with checking out the repository?

Two possible alternatives, but not exactly what you’re asking for:

  1. Include the script directly in the run block, if it’s not too big.
steps:
  - name: Run Script
    shell: bash
    run: |
      ls this/
      echo "that"
  1. Set up and use an Action that runs your script (probably a Docker or Composite action). Not that running an action implicitly checks out the action repository, but in that case you can keep the script in the action repository.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants