Skip to content

saucal/action-checkout-extended

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

Checkout Extended

This repo is an extension of the standard actions/checkout action, which allows some extra things to happen.

Getting Started

To clone the current repo, you can use the

- name: Checkout
  id: 'checkout'
  uses: saucal/action-checkout-extended@v2
  with:
    path: "source"

Another common need is to clone a third party repo (private or public)

- name: Checkout previous build (if any)
  id: 'checkout-built'
  uses: saucal/action-checkout-extended@v2
  with:
    repo: "owner/repo"
    use: "branch_name"
    path: "source"
    token: "GH_PERSONAL_TOKEN" # needs repo scope to access private repos

Full options

- uses: saucal/action-checkout-extended@v2
  with:
    # Relative path to clone the repo on.
    path: ""

    # Token to use to clone the repo. 
    # Defaults to the autogenerated token for the current repo.
    token: "${{ github.token }}"

    # Repo to clone (defaults to current repository)
    repo: "${{ github.repository }}"

    # Commit/branch/tag to build
    # value `current` (the default) will check out the latest commit
    use: "current"

    # When setting for committing, use this as Commiter Name
    use-cn: "github-actions[bot]"

    # When setting for committing, use this as Commiter Email
    use-ce: "41898282+github-actions[bot]@users.noreply.github.com"

    # When setting for committing, use this as Author Name
    use-an: ""

    # When setting for committing, use this as Author Email
    use-ae: ""

    # Continue on error on checkout
    continue-on-error: "false"

Outputs

# SHA of checked out commit
- ${{ steps.*.outputs.sha }}

# Author Name of checked out commit
- ${{ steps.*.outputs.an }}

# Author Email of checked out commit
- ${{ steps.*.outputs.ae }}

# Commiter Name of checked out commit
- ${{ steps.*.outputs.cn }}

# Commiter Email of checked out commit
- ${{ steps.*.outputs.ce }}

# Commit message of checked out commit
- ${{ steps.*.outputs.message }}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published