Merge pull request 'fix: entrypoint' (#2) from main into v1

Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
david committed 2025-12-05 15:45:11 +01:00
commit 2257ada498
5 files changed
+18 -7

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@ minimum_pre_commit_version: "3.0.0"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
+1 -1
View File
@@ -1,4 +1,4 @@
FROM alpine:3.20
FROM alpine:3.22
RUN apk add git
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
+4
View File
@@ -2,6 +2,10 @@
This action clones project's code under __$GITHUB_WORKSPACE__.
## Inputs
## Outputs
## Usage
```yaml
+3
View File
@@ -1,5 +1,8 @@
name: Checkout
description: Checkout code.
inputs: {}
outputs: {}
runs:
using: docker
image: Dockerfile
args: []
+9 -5
View File
@@ -1,7 +1,11 @@
#!/bin/sh -l
git version
[ -z "$GH_TOKEN" ] \
&& git clone --branch ${GITHUB_REF_NAME} ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} ./ \
|| git clone --branch ${GITHUB_REF_NAME} $(echo ${GITHUB_SERVER_URL} | sed -r "s|(https*://)|\1${GH_TOKEN}@|")/${GITHUB_REPOSITORY} ./
if [ -z "${GH_TOKEN}" ]
then
git config --global "url.${GITHUB_SERVER_URL}.insteadOf" "gitea:/"
else
git config --global url.$(echo ${GITHUB_SERVER_URL} | sed "s|://|://${GH_TOKEN}@|g").insteadOf "gitea:/"
fi
cat ~/.gitconfig
echo "git clone --branch=${GITHUB_REF_NAME} gitea://${GITHUB_REPOSITORY} ./"
git status