Compare commits

...

4 Commits
v1 ... v1.4

Author SHA1 Message Date
Michael Schmidt
f4c387e22b removed subpath check
Some checks failed
Check dist / check-dist (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
Licensed / Check licenses (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / test (macos-latest) (push) Has been cancelled
Build and Test / test (ubuntu-latest) (push) Has been cancelled
Build and Test / test (windows-latest) (push) Has been cancelled
Build and Test / test-proxy (push) Has been cancelled
Build and Test / test-bypass-proxy (push) Has been cancelled
Build and Test / test-git-container (push) Has been cancelled
2023-07-18 07:27:41 +02:00
Michael Schmidt
7b256c6763 checkout@v1.3 2023-07-17 16:11:22 +02:00
Michael Schmidt
c9e55219f5 subpath fix 2023-07-17 16:05:07 +02:00
Michael Schmidt
9eeba4b77e v1.1 2023-07-17 15:45:25 +02:00
3 changed files with 24 additions and 14 deletions

View File

@@ -4,6 +4,12 @@
This is a fork of https://github.com/actions/checkout@v3 This is a fork of https://github.com/actions/checkout@v3
# Build
## Windows
ncc.cmd build .\src\main.ts
# What's new # What's new
With this action it is possible to check out a repository located on a Gitea instance with subdirectories. With this action it is possible to check out a repository located on a Gitea instance with subdirectories.

14
dist/index.js vendored
View File

@@ -35339,11 +35339,15 @@ function getInputs() {
`${github.context.repo.owner}/${github.context.repo.repo}`; `${github.context.repo.owner}/${github.context.repo.repo}`;
core.debug(`qualified repository = '${qualifiedRepository}'`); core.debug(`qualified repository = '${qualifiedRepository}'`);
const splitRepository = qualifiedRepository.split('/'); const splitRepository = qualifiedRepository.split('/');
if (splitRepository.length !== 2 || // if (
!splitRepository[0] || // splitRepository.length !== 2 ||
!splitRepository[1]) { // !splitRepository[0] ||
throw new Error(`Invalid repository '${qualifiedRepository}'. Expected format {owner}/{repo}.`); // !splitRepository[1]
} // ) {
// throw new Error(
// `Invalid repository '${qualifiedRepository}'. Expected format {owner}/{repo}.`
// )
// }
result.repositoryOwner = splitRepository[0]; result.repositoryOwner = splitRepository[0];
result.repositoryName = splitRepository[1]; result.repositoryName = splitRepository[1];
// Repository path // Repository path

View File

@@ -23,15 +23,15 @@ export async function getInputs(): Promise<IGitSourceSettings> {
`${github.context.repo.owner}/${github.context.repo.repo}` `${github.context.repo.owner}/${github.context.repo.repo}`
core.debug(`qualified repository = '${qualifiedRepository}'`) core.debug(`qualified repository = '${qualifiedRepository}'`)
const splitRepository = qualifiedRepository.split('/') const splitRepository = qualifiedRepository.split('/')
if ( // if (
splitRepository.length !== 2 || // splitRepository.length !== 2 ||
!splitRepository[0] || // !splitRepository[0] ||
!splitRepository[1] // !splitRepository[1]
) { // ) {
throw new Error( // throw new Error(
`Invalid repository '${qualifiedRepository}'. Expected format {owner}/{repo}.` // `Invalid repository '${qualifiedRepository}'. Expected format {owner}/{repo}.`
) // )
} // }
result.repositoryOwner = splitRepository[0] result.repositoryOwner = splitRepository[0]
result.repositoryName = splitRepository[1] result.repositoryName = splitRepository[1]