checkout/action.yml

38 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2024-03-19 20:37:23 +00:00
# SPDX-License-Identifier: EUPL-1.2
name: "Checkout"
description: "Checkout a Git repository at a particular version"
inputs:
repository:
description: >
Repository name with owner. For example, actions/checkout
default: ${{ github.server_url }}/${{ github.repository }}.git
token:
description: >
Personal access token (PAT) used to fetch the repository. The PAT is configured
with the local git config, which enables your scripts to run authenticated git
commands.
default: ${{ github.token }}
path:
description: >
Relative path under $GITHUB_WORKSPACE to place the repository
default: .
ref:
description: >
The branch, tag or SHA to checkout. When checking out the repository that
triggered a workflow, this defaults to the reference or SHA for that
event. Otherwise, uses the default branch.
default: ${{ github.ref || github.sha }}
runs:
using: composite
steps:
- name: Checkout
shell: bash
run: |
export PATH=${{ github.action_path }}/scripts:$PATH
checkout.sh
env:
ACTION_INPUT_TOKEN: ${{ inputs.token }}
ACTION_INPUT_REPOSITORY: ${{ inputs.repository }}
ACTION_INPUT_PATH: ${{ inputs.path }}
ACTION_INPUT_REF: ${{ inputs.ref }}