Skip to content

confirm that default checks out GITHUB_SHA #8

Closed
@maxheld83

Description

@maxheld83

I'd like to confirm what happens when I just use the checkout action with all defaults, such as in the below:

name: Document Conversion

on: push

jobs:
  convert_via_pandoc:
    name: Convert via Pandoc
    runs-on: ubuntu-18.04
    steps:
      - uses: actions/checkout@v1
      - uses: maxheld83/pandoc@master
        with:
          args: "--standalone --output=index.html README.md"

My assumption would be that behind the scenes something like git clone and git checkout $GITHUB_SHA happens, so that this always puts whatever git ref the push event brought along into GITHUB_WORKSPACE.

The docs are a little hazy on this:

To create a specific copy of your repository, you can checkout a specific branch, SHA, or tag from your repository, with the with syntax:

- uses: actions/checkout@master
   with:
     ref: refs/heads/master

They don't however state explicitly what the default behavior is.

I've tested this empirically and I seem to be correct, but I'd like to be certain.

Would be nice to

  • confirm that I got this right
  • change the docs accordingly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions