This repo is an extension of the standard actions/checkout action, which allows some extra things to happen.
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
- 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"
# 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 }}