feat: git clone repo #1

Merged
david merged 1 commits from main into release/v1 2024-07-29 13:07:42 +00:00
5 changed files with 28 additions and 17 deletions

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
minimum_pre_commit_version: "3.0.0"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
+2 -1
View File
@@ -1,3 +1,4 @@
FROM alpine:3.20
RUN apk add git
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
ENTRYPOINT ["/entrypoint.sh"]
+11 -13
View File
@@ -1,17 +1,15 @@
# Checkout action
# Checkout V1
This action checkout project's code.
This action clones project's code under __$GITHUB_WORKSPACE__.
## Inputs
None
## Outputs
None
## Example usage
## Usage
```yaml
- uses: actions/checkout@v1
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
uses: actions/checkout@v1
```
## Environment variables
To checks out a private repo, __GH_TOKEN__ must be configured with an authentication token with read permissions.
+1 -1
View File
@@ -2,4 +2,4 @@ name: Checkout
description: Checkout code.
runs:
using: docker
image: docker://test:latest
image: Dockerfile
+6 -2
View File
@@ -1,3 +1,7 @@
#!/bin/sh -l
env
pwd
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} ./