Compare commits

...

15 Commits
v4.2.1 ... v1

Author SHA1 Message Date
Michael Schmidt
9d5d72f348 build v1 2023-07-17 15:35:26 +02:00
Michael Schmidt
1cb683f59c changed the docs 2023-07-13 12:54:34 +02:00
Michael Schmidt
1faf939219 v1.0.1 2023-07-13 11:38:27 +02:00
Michael Schmidt
7e0f95e47a dfghdfghdfrgh 2023-07-11 13:30:41 +02:00
Michael Schmidt
95951da3cb ddddddddddddddddddddddd 2023-07-11 12:33:42 +02:00
Michael Schmidt
bdc764ff89 sdfsdf xcvxcvxcv 2023-07-10 15:42:21 +02:00
Michael Schmidt
be5e352fa7 added pathname to url-helper 2023-07-10 15:37:44 +02:00
Michael Schmidt
016e95b24b hjklhgjgfhjghj 2023-07-10 15:20:02 +02:00
Michael Schmidt
67a3a54916 gdfhdfgh dfghdfgh dfgh 2023-07-10 15:14:11 +02:00
Michael Schmidt
ccbde630fa built index 2023-07-10 14:58:08 +02:00
Michael Schmidt
1d92969ea6 added subdir in url 2023-07-10 14:55:35 +02:00
Michael Schmidt
8098344c6b asdfsadfsadfasdf 2023-07-10 14:51:07 +02:00
Michael Schmidt
ff93395c55 xvcxyvxcyv 2023-07-10 14:47:43 +02:00
Michael Schmidt
f863e5cf3d dcfsdfsdf 2023-07-10 14:28:18 +02:00
Michael Schmidt
7892dca28d build test 2023-07-10 14:19:07 +02:00
7 changed files with 35653 additions and 30557 deletions

19
.gitignore vendored
View File

@@ -1,4 +1,21 @@
__test__/_temp
_temp/
lib/
node_modules/
node_modules/
/dist/fs-helper.d.ts
/dist/git-auth-helper.d.ts
/dist/git-command-manager.d.ts
/dist/git-directory-helper.d.ts
/dist/git-source-provider.d.ts
/dist/git-source-settings.d.ts
/dist/git-version.d.ts
/dist/github-api-helper.d.ts
/dist/input-helper.d.ts
/dist/main.d.ts
/dist/misc/generate-docs.d.ts
/dist/ref-helper.d.ts
/dist/regexp-helper.d.ts
/dist/retry-helper.d.ts
/dist/state-helper.d.ts
/dist/url-helper.d.ts
/dist/workflow-context-helper.d.ts

View File

@@ -2,26 +2,22 @@
<a href="https://github.com/actions/checkout"><img alt="GitHub Actions status" src="https://github.com/actions/checkout/workflows/test-local/badge.svg"></a>
</p>
# Checkout V3
This action checks-out your repository under `$GITHUB_WORKSPACE`, so your workflow can access it.
Only a single commit is fetched by default, for the ref/SHA that triggered the workflow. Set `fetch-depth: 0` to fetch all history for all branches and tags. Refer [here](https://help.github.com/en/articles/events-that-trigger-workflows) to learn which commit `$GITHUB_SHA` points to for different events.
The auth token is persisted in the local git config. This enables your scripts to run authenticated git commands. The token is removed during post-job cleanup. Set `persist-credentials: false` to opt-out.
When Git 2.18 or higher is not in your PATH, falls back to the REST API to download the files.
This is a fork of https://github.com/actions/checkout@v3
# What's new
- Updated to the node16 runtime by default
- This requires a minimum [Actions Runner](https://github.com/actions/runner/releases/tag/v2.285.0) version of v2.285.0 to run, which is by default available in GHES 3.4 or later.
With this action it is possible to check out a repository located on a Gitea instance with subdirectories.
Changed
`https://<domain>[:<port>]/<name>/<repository>`
to
`https://<domain>[:<port>]/<subpath>/<name>/<repository>`
# Usage
<!-- start usage -->
```yaml
- uses: actions/checkout@v3
- uses: https://gitea.com/ScMi1/checkout@v1
with:
# Repository name with owner. For example, actions/checkout
# Default: ${{ github.repository }}

33315
dist/index.js vendored

File diff suppressed because one or more lines are too long

32849
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -53,7 +53,7 @@ class GitAuthHelper {
// Token auth header
const serverUrl = urlHelper.getServerUrl()
this.tokenConfigKey = `http.${serverUrl.origin}/.extraheader` // "origin" is SCHEME://HOSTNAME[:PORT]
this.tokenConfigKey = `http.${serverUrl.origin}${serverUrl.pathname}/.extraheader` // "origin" is SCHEME://HOSTNAME[:PORT]
const basicCredential = Buffer.from(
`x-access-token:${this.settings.authToken}`,
'utf8'
@@ -63,7 +63,7 @@ class GitAuthHelper {
this.tokenConfigValue = `AUTHORIZATION: basic ${basicCredential}`
// Instead of SSH URL
this.insteadOfKey = `url.${serverUrl.origin}/.insteadOf` // "origin" is SCHEME://HOSTNAME[:PORT]
this.insteadOfKey = `url.${serverUrl.origin}${serverUrl.pathname}/.insteadOf` // "origin" is SCHEME://HOSTNAME[:PORT]
this.insteadOfValues.push(`git@${serverUrl.hostname}:`)
if (this.settings.workflowOrganizationId) {
this.insteadOfValues.push(

View File

@@ -231,6 +231,7 @@ class GitCommandManager {
}
async init(): Promise<void> {
await this.execGit(['config', '--global', 'init.defaultBranch', 'main'])
await this.execGit(['init', this.workingDirectory])
}

View File

@@ -16,7 +16,7 @@ export function getFetchUrl(settings: IGitSourceSettings): string {
}
// "origin" is SCHEME://HOSTNAME[:PORT]
return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`
return `${serviceUrl.origin}${serviceUrl.pathname}/${encodedOwner}/${encodedName}`
}
export function getServerUrl(): URL {