mirror of
https://github.com/actions/checkout.git
synced 2025-09-11 18:22:21 +08:00
Compare commits
1 Commits
67c4b9dd4e
...
dependabot
Author | SHA1 | Date | |
---|---|---|---|
|
1b0793cc05 |
@@ -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
|
||||
|
2
.github/workflows/update-test-ubuntu-git.yml
vendored
2
.github/workflows/update-test-ubuntu-git.yml
vendored
@@ -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
|
||||
|
@@ -281,6 +281,8 @@ jobs:
|
||||
- run: |
|
||||
date > generated.txt
|
||||
# Note: the following account information will not work on GHES
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add .
|
||||
git commit -m "generated"
|
||||
git push
|
||||
@@ -303,6 +305,8 @@ jobs:
|
||||
- run: |
|
||||
date > generated.txt
|
||||
# Note: the following account information will not work on GHES
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add .
|
||||
git commit -m "generated"
|
||||
git push
|
||||
|
@@ -22,12 +22,6 @@ inputs:
|
||||
|
||||
[Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
|
||||
default: ${{ github.token }}
|
||||
configure-user:
|
||||
description: >
|
||||
Whether to configure user.name and user.email in the local git config.
|
||||
This is required to push a commit from a Github Action Workflow.
|
||||
Set to `false` to disable the config.
|
||||
default: true
|
||||
ssh-key:
|
||||
description: >
|
||||
SSH key used to fetch the repository. The SSH key is configured with the local
|
||||
|
3
dist/index.js
vendored
3
dist/index.js
vendored
@@ -1813,9 +1813,6 @@ function getInputs() {
|
||||
core.debug(`recursive submodules = ${result.nestedSubmodules}`);
|
||||
// Auth token
|
||||
result.authToken = core.getInput('token', { required: true });
|
||||
// Configure user
|
||||
result.configureUser =
|
||||
(core.getInput('configure-user') || 'true').toUpperCase() === 'TRUE'
|
||||
// SSH
|
||||
result.sshKey = core.getInput('ssh-key');
|
||||
result.sshKnownHosts = core.getInput('ssh-known-hosts');
|
||||
|
@@ -274,14 +274,6 @@ export async function getSource(settings: IGitSourceSettings): Promise<void> {
|
||||
settings.commit,
|
||||
settings.githubServerUrl
|
||||
)
|
||||
if (settings.configureUser) {
|
||||
if (!await git.configExists('user.name', true)) {
|
||||
await git.config('user.name', 'github-action[bot]', true)
|
||||
}
|
||||
if (!await git.configExists('user.email', true)) {
|
||||
await git.config('user.email', '41898282+github-actions[bot]@users.noreply.github.com', true)
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
// Remove auth
|
||||
if (authHelper) {
|
||||
|
@@ -79,11 +79,6 @@ export interface IGitSourceSettings {
|
||||
*/
|
||||
authToken: string
|
||||
|
||||
/**
|
||||
* Indicates whether to set a default user name and email in the local git config
|
||||
*/
|
||||
configureUser: boolean
|
||||
|
||||
/**
|
||||
* The SSH key to configure
|
||||
*/
|
||||
|
@@ -138,10 +138,6 @@ export async function getInputs(): Promise<IGitSourceSettings> {
|
||||
// Auth token
|
||||
result.authToken = core.getInput('token', {required: true})
|
||||
|
||||
// Configure user
|
||||
result.configureUser =
|
||||
(core.getInput('configure-user') || 'true').toUpperCase() === 'TRUE'
|
||||
|
||||
// SSH
|
||||
result.sshKey = core.getInput('ssh-key')
|
||||
result.sshKnownHosts = core.getInput('ssh-known-hosts')
|
||||
|
Reference in New Issue
Block a user