feat: initial action implementation

This commit is contained in:
Louis Seubert 2024-03-19 21:37:23 +01:00
commit a849295b46
Signed by: louis9902
GPG key ID: 4B9DB28F826553BD
4 changed files with 465 additions and 0 deletions

37
action.yml Normal file
View file

@ -0,0 +1,37 @@
# 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 }}