From 0f25b04d71206b1ac2cc39472dbf30827b2ab3f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Rudowicz?= Date: Tue, 25 Feb 2025 18:34:40 +0100 Subject: [PATCH] Initial checkout action --- .forgejo/workflows/test_workflow.yml | 10 ++++++++++ checkout/action.yml | 12 ++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 .forgejo/workflows/test_workflow.yml create mode 100644 checkout/action.yml diff --git a/.forgejo/workflows/test_workflow.yml b/.forgejo/workflows/test_workflow.yml new file mode 100644 index 0000000..f891354 --- /dev/null +++ b/.forgejo/workflows/test_workflow.yml @@ -0,0 +1,10 @@ +on: + push: +jobs: + test: + runs-on: docker + container: + image: git.hswro.org/fleg/actions-experiments:latest + steps: + - uses: https://codeberg.org/fleg/light-actions/checkout@main + - run: cat README diff --git a/checkout/action.yml b/checkout/action.yml new file mode 100644 index 0000000..b3b5947 --- /dev/null +++ b/checkout/action.yml @@ -0,0 +1,12 @@ +name: checkout +description: Checkout the git repository. +runs: + using: composite + steps: + - run: | + set -eu + git init + git remote add origin "${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" + git fetch --no-tags --prune --no-recurse-submodules --depth=1 origin "+${GITHUB_SHA}:${GITHUB_REF}" + git checkout --force "${GITHUB_REF}" + shell: sh \ No newline at end of file