Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot]
1b0793cc05 Bump the minor-actions-dependencies group across 1 directory with 2 updates
Bumps the minor-actions-dependencies group with 2 updates in the / directory: [actions/publish-immutable-action](https://github.com/actions/publish-immutable-action) and [docker/build-push-action](https://github.com/docker/build-push-action).


Updates `actions/publish-immutable-action` from 0.0.3 to 0.0.4
- [Release notes](https://github.com/actions/publish-immutable-action/releases)
- [Commits](https://github.com/actions/publish-immutable-action/compare/0.0.3...v0.0.4)

Updates `docker/build-push-action` from 6.5.0 to 6.10.0
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6.5.0...v6.10.0)

---
updated-dependencies:
- dependency-name: actions/publish-immutable-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-actions-dependencies
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-02 16:59:45 +00:00
12 changed files with 3 additions and 73 deletions

View File

@@ -17,4 +17,4 @@ jobs:
uses: actions/checkout@v4
- name: Publish
id: publish
uses: actions/publish-immutable-action@0.0.3
uses: actions/publish-immutable-action@v0.0.4

View File

@@ -48,7 +48,7 @@ jobs:
# Use `docker/build-push-action` to build (and optionally publish) the image.
- name: Build Docker Image (with optional Push)
uses: docker/build-push-action@v6.5.0
uses: docker/build-push-action@v6.10.0
with:
context: .
file: images/test-ubuntu-git.Dockerfile

View File

@@ -103,11 +103,6 @@ Please refer to the [release page](https://github.com/actions/checkout/releases/
# Default: true
show-progress: ''
# Path to a local bare git [reference repository to minimize network
# usage](https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---reference-if-ableltrepositorygt).
# If the directory doesn't exists this option will ignore it and log a message.
reference: ''
# Whether to download Git-LFS files
# Default: false
lfs: ''

View File

@@ -763,7 +763,6 @@ async function setup(testName: string): Promise<void> {
lfsInstall: jest.fn(),
log1: jest.fn(),
remoteAdd: jest.fn(),
referenceAdd: jest.fn(),
removeEnvironmentVariable: jest.fn((name: string) => delete git.env[name]),
revParse: jest.fn(),
setEnvironmentVariable: jest.fn((name: string, value: string) => {
@@ -825,8 +824,7 @@ async function setup(testName: string): Promise<void> {
sshUser: '',
workflowOrganizationId: 123456,
setSafeDirectory: true,
githubServerUrl: githubServerUrl,
reference: '/some/path'
githubServerUrl: githubServerUrl
}
}

View File

@@ -478,7 +478,6 @@ async function setup(testName: string): Promise<void> {
lfsInstall: jest.fn(),
log1: jest.fn(),
remoteAdd: jest.fn(),
referenceAdd: jest.fn(),
removeEnvironmentVariable: jest.fn(),
revParse: jest.fn(),
setEnvironmentVariable: jest.fn(),

View File

@@ -91,7 +91,6 @@ describe('input-helper tests', () => {
expect(settings.repositoryOwner).toBe('some-owner')
expect(settings.repositoryPath).toBe(gitHubWorkspace)
expect(settings.setSafeDirectory).toBe(true)
expect(settings.reference).toBe(undefined)
})
it('qualifies ref', async () => {

View File

@@ -80,12 +80,6 @@ inputs:
show-progress:
description: 'Whether to show progress status output when fetching.'
default: true
reference:
required: false
description: >
Path to a local bare git [reference repository to minimize network usage](https://git-scm.com/docs/git-clone#Documentation/git-clone.txt---reference-if-ableltrepositorygt).
If the directory doesn't exists this option will ignore it and log a message.
lfs:
description: 'Whether to download Git-LFS files'
default: false

20
dist/index.js vendored
View File

@@ -748,13 +748,6 @@ class GitCommandManager {
yield this.execGit(['remote', 'add', remoteName, remoteUrl]);
});
}
referenceAdd(alternateObjects) {
return __awaiter(this, void 0, void 0, function* () {
const alternatePath = path.join(this.workingDirectory, '.git/objects/info/alternates');
core.info(`Adding a git alternate to reference repo at ${alternateObjects}`);
yield fs.promises.writeFile(alternatePath, `${alternateObjects}\n`);
});
}
removeEnvironmentVariable(name) {
delete this.gitEnv[name];
}
@@ -1246,17 +1239,6 @@ function getSource(settings) {
yield git.init();
yield git.remoteAdd('origin', repositoryUrl);
core.endGroup();
if (settings.reference !== undefined) {
const alternateObjects = path.join(settings.reference, '/objects');
if (fsHelper.directoryExistsSync(alternateObjects, false)) {
core.startGroup('Adding a reference repository');
yield git.referenceAdd(alternateObjects);
core.endGroup();
}
else {
core.warning(`Reference repository was specified, but directory ${alternateObjects} does not exists`);
}
}
}
// Disable automatic garbage collection
core.startGroup('Disabling automatic garbage collection');
@@ -1849,8 +1831,6 @@ function getInputs() {
// Determine the GitHub URL that the repository is being hosted from
result.githubServerUrl = core.getInput('github-server-url');
core.debug(`GitHub Host URL = ${result.githubServerUrl}`);
result.reference = core.getInput('reference');
core.debug(`Reference repository = ${result.reference}`);
return result;
});
}

View File

@@ -48,7 +48,6 @@ export interface IGitCommandManager {
lfsInstall(): Promise<void>
log1(format?: string): Promise<string>
remoteAdd(remoteName: string, remoteUrl: string): Promise<void>
referenceAdd(reference: string): Promise<void>
removeEnvironmentVariable(name: string): void
revParse(ref: string): Promise<string>
setEnvironmentVariable(name: string, value: string): void
@@ -365,15 +364,6 @@ class GitCommandManager {
await this.execGit(['remote', 'add', remoteName, remoteUrl])
}
async referenceAdd(alternateObjects: string): Promise<void> {
const alternatePath = path.join(
this.workingDirectory,
'.git/objects/info/alternates'
)
core.info(`Adding a git alternate to reference repo at ${alternateObjects}`)
await fs.promises.writeFile(alternatePath, `${alternateObjects}\n`)
}
removeEnvironmentVariable(name: string): void {
delete this.gitEnv[name]
}

View File

@@ -113,18 +113,6 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
await git.init()
await git.remoteAdd('origin', repositoryUrl)
core.endGroup()
if (settings.reference !== undefined) {
const alternateObjects = path.join(settings.reference, '/objects')
if (fsHelper.directoryExistsSync(alternateObjects, false)) {
core.startGroup('Adding a reference repository')
await git.referenceAdd(alternateObjects)
core.endGroup()
} else {
core.warning(`Reference repository was specified, but directory ${alternateObjects} does not exists`);
}
}
}
// Disable automatic garbage collection

View File

@@ -49,11 +49,6 @@ export interface IGitSourceSettings {
*/
fetchDepth: number
/**
* The local reference repository
*/
reference: string | undefined
/**
* Fetch tags, even if fetchDepth > 0 (default: false)
*/
@@ -64,11 +59,6 @@ export interface IGitSourceSettings {
*/
showProgress: boolean
/**
* The local reference repository
*/
reference: string | undefined
/**
* Indicates whether to fetch LFS objects
*/

View File

@@ -161,8 +161,5 @@ export async function getInputs(): Promise<IGitSourceSettings> {
result.githubServerUrl = core.getInput('github-server-url')
core.debug(`GitHub Host URL = ${result.githubServerUrl}`)
result.reference = core.getInput('reference')
core.debug(`Reference repository = ${result.reference}`)
return result
}