mirror of https://github.com/actions/checkout
Compare commits
7 Commits
035636824a
...
e95b95fa65
| Author | SHA1 | Date |
|---|---|---|
|
|
e95b95fa65 | |
|
|
b9e0990d21 | |
|
|
e8cb398be4 | |
|
|
5de26ee9b1 | |
|
|
79102f2503 | |
|
|
55ad59dfaa | |
|
|
dedef103f1 |
|
|
@ -25,7 +25,7 @@ jobs:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Set Node.js 24.x
|
- name: Set Node.js 24.x
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version: 24.x
|
node-version: 24.x
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ jobs:
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v3
|
uses: github/codeql-action/init@v4
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
|
|
@ -55,4 +55,4 @@ jobs:
|
||||||
- run: rm -rf dist # We want code scanning to analyze lib instead (individual .js files)
|
- run: rm -rf dist # We want code scanning to analyze lib instead (individual .js files)
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v3
|
uses: github/codeql-action/analyze@v4
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version: 24.x
|
node-version: 24.x
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ jobs:
|
||||||
# Use `docker/login-action` to log in to GHCR.io.
|
# Use `docker/login-action` to log in to GHCR.io.
|
||||||
# Once published, the packages are scoped to the account defined here.
|
# Once published, the packages are scoped to the account defined here.
|
||||||
- name: Log in to the ghcr.io container registry
|
- name: Log in to the ghcr.io container registry
|
||||||
uses: docker/login-action@v3.3.0
|
uses: docker/login-action@v4.2.0
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
|
|
@ -48,7 +48,7 @@ jobs:
|
||||||
|
|
||||||
# Use `docker/build-push-action` to build (and optionally publish) the image.
|
# Use `docker/build-push-action` to build (and optionally publish) the image.
|
||||||
- name: Build Docker Image (with optional Push)
|
- name: Build Docker Image (with optional Push)
|
||||||
uses: docker/build-push-action@v6.5.0
|
uses: docker/build-push-action@v7.2.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: images/test-ubuntu-git.Dockerfile
|
file: images/test-ubuntu-git.Dockerfile
|
||||||
|
|
|
||||||
|
|
@ -336,7 +336,7 @@ class GitCommandManager {
|
||||||
line = line.trim()
|
line = line.trim()
|
||||||
if (line.startsWith('ref:') || line.endsWith('HEAD')) {
|
if (line.startsWith('ref:') || line.endsWith('HEAD')) {
|
||||||
return line
|
return line
|
||||||
.substr('ref:'.length, line.length - 'ref:'.length - 'HEAD'.length)
|
.slice('ref:'.length, line.length - 'HEAD'.length)
|
||||||
.trim()
|
.trim()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,11 +64,11 @@ export async function prepareExistingDirectory(
|
||||||
if (ref) {
|
if (ref) {
|
||||||
ref = ref.startsWith('refs/') ? ref : `refs/heads/${ref}`
|
ref = ref.startsWith('refs/') ? ref : `refs/heads/${ref}`
|
||||||
if (ref.startsWith('refs/heads/')) {
|
if (ref.startsWith('refs/heads/')) {
|
||||||
const upperName1 = ref.toUpperCase().substr('REFS/HEADS/'.length)
|
const upperName1 = ref.toUpperCase().slice('REFS/HEADS/'.length)
|
||||||
const upperName1Slash = `${upperName1}/`
|
const upperName1Slash = `${upperName1}/`
|
||||||
branches = await git.branchList(true)
|
branches = await git.branchList(true)
|
||||||
for (const branch of branches) {
|
for (const branch of branches) {
|
||||||
const upperName2 = branch.substr('origin/'.length).toUpperCase()
|
const upperName2 = branch.slice('origin/'.length).toUpperCase()
|
||||||
const upperName2Slash = `${upperName2}/`
|
const upperName2Slash = `${upperName2}/`
|
||||||
if (
|
if (
|
||||||
upperName1.startsWith(upperName2Slash) ||
|
upperName1.startsWith(upperName2Slash) ||
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ function updateUsage(
|
||||||
const newReadme: string[] = []
|
const newReadme: string[] = []
|
||||||
|
|
||||||
// Append the beginning
|
// Append the beginning
|
||||||
newReadme.push(originalReadme.substr(0, startTokenIndex + startToken.length))
|
newReadme.push(originalReadme.slice(0, startTokenIndex + startToken.length))
|
||||||
|
|
||||||
// Build the new usage section
|
// Build the new usage section
|
||||||
newReadme.push('```yaml', `- uses: ${actionReference}`, ' with:')
|
newReadme.push('```yaml', `- uses: ${actionReference}`, ' with:')
|
||||||
|
|
@ -71,9 +71,9 @@ function updateUsage(
|
||||||
// Longer than width? Find a space to break apart
|
// Longer than width? Find a space to break apart
|
||||||
let segment: string = description
|
let segment: string = description
|
||||||
if (description.length > width) {
|
if (description.length > width) {
|
||||||
segment = description.substr(0, width + 1)
|
segment = description.slice(0, width + 1)
|
||||||
while (!segment.endsWith(' ') && !segment.endsWith('\n') && segment) {
|
while (!segment.endsWith(' ') && !segment.endsWith('\n') && segment) {
|
||||||
segment = segment.substr(0, segment.length - 1)
|
segment = segment.slice(0, -1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trimmed too much?
|
// Trimmed too much?
|
||||||
|
|
@ -87,14 +87,14 @@ function updateUsage(
|
||||||
// Check for newline
|
// Check for newline
|
||||||
const newlineIndex = segment.indexOf('\n')
|
const newlineIndex = segment.indexOf('\n')
|
||||||
if (newlineIndex >= 0) {
|
if (newlineIndex >= 0) {
|
||||||
segment = segment.substr(0, newlineIndex + 1)
|
segment = segment.slice(0, newlineIndex + 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Append segment
|
// Append segment
|
||||||
newReadme.push(` # ${segment}`.trimRight())
|
newReadme.push(` # ${segment}`.trimRight())
|
||||||
|
|
||||||
// Remaining
|
// Remaining
|
||||||
description = description.substr(segment.length)
|
description = description.slice(segment.length)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (input.default !== undefined) {
|
if (input.default !== undefined) {
|
||||||
|
|
@ -116,7 +116,7 @@ function updateUsage(
|
||||||
newReadme.push('```')
|
newReadme.push('```')
|
||||||
|
|
||||||
// Append the end
|
// Append the end
|
||||||
newReadme.push(originalReadme.substr(endTokenIndex))
|
newReadme.push(originalReadme.slice(endTokenIndex))
|
||||||
|
|
||||||
// Write the new README
|
// Write the new README
|
||||||
fs.writeFileSync(readmePath, newReadme.join(os.EOL))
|
fs.writeFileSync(readmePath, newReadme.join(os.EOL))
|
||||||
|
|
|
||||||
|
|
@ -306,6 +306,6 @@ function select(obj: any, path: string): any {
|
||||||
return obj[path]
|
return obj[path]
|
||||||
}
|
}
|
||||||
|
|
||||||
const key = path.substr(0, i)
|
const key = path.slice(0, i)
|
||||||
return select(obj[key], path.substr(i + 1))
|
return select(obj[key], path.slice(i + 1))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue