Merge branch 'main' into repo-sync
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
title: Comandos de flujo de trabajo para Acciones de GitHub
|
||||
shortTitle: Comandos de flujo de trabajo
|
||||
intro: Puedes usar comandos de flujo de trabajo cuando ejecutas comandos de Shell en un flujo de trabajo o en el código de una acción.
|
||||
defaultTool: bash
|
||||
redirect_from:
|
||||
- /articles/development-tools-for-github-actions
|
||||
- /github/automating-your-workflow-with-github-actions/development-tools-for-github-actions
|
||||
@@ -26,10 +27,24 @@ Las acciones pueden comunicarse con la máquina del ejecutor para establecer var
|
||||
|
||||
La mayoría de los comandos de los flujos de trabajo utilizan el comando `echo` en un formato específico, mientras que otras se invocan si escribes a un archivo. Para obtener más información, consulta la sección ["Archivos de ambiente".](#environment-files)
|
||||
|
||||
``` bash
|
||||
### Ejemplo
|
||||
|
||||
{% bash %}
|
||||
|
||||
```bash{:copy}
|
||||
echo ":: Workflow-Command Parameter1 ={data}, parameter2 ={data}::{command value}"
|
||||
```
|
||||
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```pwsh{:copy}
|
||||
Write-Output "::workflow-command parameter1={data},parameter2={data}::{command value}"
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Nota:** los nombres de comandos y parámetros de flujo de trabajo no distinguen mayúsculas de minúsculas.
|
||||
@@ -46,14 +61,18 @@ echo ":: Workflow-Command Parameter1 ={data}, parameter2 ={data}::{command value
|
||||
|
||||
El [actions/toolkit](https://github.com/actions/toolkit) incluye varias funciones que se pueden ejecutar como comandos de flujo de trabajo. Utiliza la sintaxis `::` para ejecutar los comandos de flujo de trabajo dentro de tu archivo YAML; estos comandos se envían entonces a través de `stdout`. Por ejemplo, en vez de utilizar código para configurar una salida, como se muestra aquí:
|
||||
|
||||
```javascript
|
||||
```javascript{:copy}
|
||||
core.setOutput('SELECTED_COLOR', 'green');
|
||||
```
|
||||
|
||||
### Example: Setting a value
|
||||
|
||||
Puedes utilizar el comando `set-output` en tu flujo de trabajo para configurar el mismo valor:
|
||||
|
||||
{% bash %}
|
||||
|
||||
{% raw %}
|
||||
``` yaml
|
||||
```yaml{:copy}
|
||||
- name: Set selected color
|
||||
run: echo '::set-output name=SELECTED_COLOR::green'
|
||||
id: random-color-generator
|
||||
@@ -62,6 +81,22 @@ Puedes utilizar el comando `set-output` en tu flujo de trabajo para configurar e
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
{% raw %}
|
||||
```yaml{:copy}
|
||||
- name: Set selected color
|
||||
run: Write-Output "::set-output name=SELECTED_COLOR::green"
|
||||
id: random-color-generator
|
||||
- name: Get color
|
||||
run: Write-Output "The selected color is ${{ steps.random-color-generator.outputs.SELECTED_COLOR }}"
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
La siguiente tabla muestra qué funciones del toolkit se encuentran disponibles dentro de un flujo de trabajo:
|
||||
|
||||
| Funcion del Toolkit | Comando equivalente del flujo de trabajo |
|
||||
@@ -86,186 +121,336 @@ La siguiente tabla muestra qué funciones del toolkit se encuentran disponibles
|
||||
|
||||
## Configurar un parámetro de salida
|
||||
|
||||
```
|
||||
Establece un parámetro de salida de la acción.
|
||||
|
||||
```{:copy}
|
||||
::set-output name={name}::{value}
|
||||
```
|
||||
|
||||
Establece un parámetro de salida de la acción.
|
||||
|
||||
Opcionalmente, también puedes declarar parámetros de salida en el archivo de metadatos de una acción. Para obtener más información, consulta la sección "[Sintaxis de metadatos para {% data variables.product.prodname_actions %}](/articles/metadata-syntax-for-github-actions#outputs-for-docker-container-and-javascript-actions)".
|
||||
|
||||
### Ejemplo
|
||||
### Example: Setting an output parameter
|
||||
|
||||
``` bash
|
||||
{% bash %}
|
||||
|
||||
```bash{:copy}
|
||||
echo "::set-output name=action_fruit::strawberry"
|
||||
```
|
||||
|
||||
## Agregar un mensaje de depuración
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```pwsh{:copy}
|
||||
Write-Output "::set-output name=action_fruit::strawberry"
|
||||
```
|
||||
::debug::{message}
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
## Agregar un mensaje de depuración
|
||||
|
||||
Imprime un mensaje de depuración para el registro. Debes crear un archivo `ACTIONS_STEP_DEBUG` designado secretamente con el valor `true` para ver los mensajes de depuración establecidos por este comando en el registro. Para obtener más información, consulta la sección "[Habilitar el registro de depuración](/actions/managing-workflow-runs/enabling-debug-logging)."
|
||||
|
||||
### Ejemplo
|
||||
```{:copy}
|
||||
::debug::{message}
|
||||
```
|
||||
|
||||
``` bash
|
||||
### Example: Setting a debug message
|
||||
|
||||
{% bash %}
|
||||
|
||||
```bash{:copy}
|
||||
echo "::debug::Set the Octocat variable"
|
||||
```
|
||||
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```pwsh{:copy}
|
||||
Write-Output "::debug::Set the Octocat variable"
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
{% ifversion fpt or ghes > 3.2 or ghae-issue-4929 or ghec %}
|
||||
|
||||
## Configurar un mensaje de aviso
|
||||
|
||||
```
|
||||
Crea un mensaje de aviso e imprime el mensaje en la bitácora. {% data reusables.actions.message-annotation-explanation %}
|
||||
|
||||
```{:copy}
|
||||
::notice file={name},line={line},endLine={endLine},title={title}::{message}
|
||||
```
|
||||
|
||||
Crea un mensaje de aviso e imprime el mensaje en la bitácora. {% data reusables.actions.message-annotation-explanation %}
|
||||
|
||||
{% data reusables.actions.message-parameters %}
|
||||
|
||||
### Ejemplo
|
||||
### Example: Setting a notice message
|
||||
|
||||
``` bash
|
||||
{% bash %}
|
||||
|
||||
```bash{:copy}
|
||||
echo "::notice file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
|
||||
```
|
||||
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```pwsh{:copy}
|
||||
Write-Output "::notice file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
{% endif %}
|
||||
|
||||
## Configurar un mensaje de advertencia
|
||||
|
||||
```
|
||||
Crea un mensaje de advertencia e imprime el mensaje en el registro. {% data reusables.actions.message-annotation-explanation %}
|
||||
|
||||
```{:copy}
|
||||
::warning file={name},line={line},endLine={endLine},title={title}::{message}
|
||||
```
|
||||
|
||||
Crea un mensaje de advertencia e imprime el mensaje en el registro. {% data reusables.actions.message-annotation-explanation %}
|
||||
|
||||
{% data reusables.actions.message-parameters %}
|
||||
|
||||
### Ejemplo
|
||||
### Example: Setting a warning message
|
||||
|
||||
``` bash
|
||||
{% bash %}
|
||||
|
||||
```bash{:copy}
|
||||
echo "::warning file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
|
||||
```
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```pwsh{:copy}
|
||||
Write-Output "::warning file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
## Configurar un mensaje de error
|
||||
|
||||
```
|
||||
Crea un mensaje de error e imprime el mensaje en el registro {% data reusables.actions.message-annotation-explanation %}
|
||||
|
||||
```{:copy}
|
||||
::error file={name},line={line},endLine={endLine},title={title}::{message}
|
||||
```
|
||||
|
||||
Crea un mensaje de error e imprime el mensaje en el registro {% data reusables.actions.message-annotation-explanation %}
|
||||
|
||||
{% data reusables.actions.message-parameters %}
|
||||
|
||||
### Ejemplo
|
||||
### Example: Setting an error message
|
||||
|
||||
``` bash
|
||||
{% bash %}
|
||||
|
||||
```bash{:copy}
|
||||
echo "::error file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
|
||||
```
|
||||
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```pwsh{:copy}
|
||||
Write-Output "::error file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
## Agrupar líneas de las bitácoras
|
||||
|
||||
```
|
||||
Crea un grupo expansible en la bitácora. Para crear un grupo, utiliza el comando `group` y especifica un `title`. Todo lo que imprimas en la bitácora entre los comandos `group` y `endgroup` se anidará dentro de una entrada expansible en la misma.
|
||||
|
||||
```{:copy}
|
||||
::group::{title}
|
||||
::endgroup::
|
||||
```
|
||||
|
||||
Crea un grupo expansible en la bitácora. Para crear un grupo, utiliza el comando `group` y especifica un `title`. Todo lo que imprimas en la bitácora entre los comandos `group` y `endgroup` se anidará dentro de una entrada expansible en la misma.
|
||||
### Example: Grouping log lines
|
||||
|
||||
### Ejemplo
|
||||
{% bash %}
|
||||
|
||||
```bash
|
||||
echo "::group::My title"
|
||||
echo "Inside group"
|
||||
echo "::endgroup::"
|
||||
```yaml{:copy}
|
||||
jobs:
|
||||
bash-example:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Group of log lines
|
||||
run: |
|
||||
echo "::group::My title"
|
||||
echo "Inside group"
|
||||
echo "::endgroup::"
|
||||
```
|
||||
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```yaml{:copy}
|
||||
jobs:
|
||||
powershell-example:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Group of log lines
|
||||
run: |
|
||||
Write-Output "::group::My title"
|
||||
Write-Output "Inside group"
|
||||
Write-Output "::endgroup::"
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||

|
||||
|
||||
## Enmascarar un valor en el registro
|
||||
|
||||
```
|
||||
```{:copy}
|
||||
::add-mask::{value}
|
||||
```
|
||||
|
||||
El enmascaramiento de un valor impide que una cadena o variable se imprima en el registro. Cada palabra enmascarada separada por un espacio en blanco se reemplaza con el carácter `*`. Puedes usar una variable de entorno o cadena para el `valor` de la máscara.
|
||||
|
||||
### Ejemplo de enmascaramiento de una cadena
|
||||
### Example: Masking a string
|
||||
|
||||
Cuando imprimas `"Mona The Octocat"` en el registro, verás `"***"`.
|
||||
|
||||
```bash
|
||||
{% bash %}
|
||||
|
||||
```bash{:copy}
|
||||
echo "::add-mask::Mona The Octocat"
|
||||
```
|
||||
|
||||
### Ejemplo de enmascaramiento de una variable de entorno
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```pwsh{:copy}
|
||||
Write-Output "::add-mask::Mona The Octocat"
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
### Example: Masking an environment variable
|
||||
|
||||
Cuando imprimes la variable `MY_NAME` o el valor `"Mona The Octocat"` en el registro, verás `"***"` en lugar de `"Mona The Octocat"`.
|
||||
|
||||
```bash
|
||||
MY_NAME="Mona The Octocat"
|
||||
echo "::add-mask::$MY_NAME"
|
||||
{% bash %}
|
||||
|
||||
```yaml{:copy}
|
||||
jobs:
|
||||
bash-example:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
MY_NAME: "Mona The Octocat"
|
||||
steps:
|
||||
- name: bash-version
|
||||
run: echo "::add-mask::$MY_NAME"
|
||||
```
|
||||
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```yaml{:copy}
|
||||
jobs:
|
||||
powershell-example:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
MY_NAME: "Mona The Octocat"
|
||||
steps:
|
||||
- name: powershell-version
|
||||
run: Write-Output "::add-mask::$env:MY_NAME"
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
## Detener e iniciar comandos de flujo de trabajo
|
||||
|
||||
`::stop-commands::{endtoken}`
|
||||
|
||||
Deja de procesar cualquier comando de flujo de trabajo. Este comando especial te permite registrar lo que sea sin ejecutar accidentalmente un comando de flujo de trabajo. Por ejemplo, podrías dejar de registrar para producir un script completo que tenga comentarios.
|
||||
|
||||
```{:copy}
|
||||
::stop-commands::{endtoken}
|
||||
```
|
||||
|
||||
Para parar el procesamiento de los comandos de flujo de trabajo, pasa un token único a `stop-commands`. Para resumir los comandos de flujo de trabajo de procesamiento, pasa el mismo token que utilizaste para detener los comandos de flujo de trabajo.
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Advertencia:** Asegúrate de que el token que estás utilizando se genere aleatoriamente y sea único para cada ejecución. Tal como se demuestra en el siguiente ejemplo, puedes generar un hash único de tu `github.token` para cada ejecución.
|
||||
**Advertencia:** Asegúrate de que el token que estás utilizando se genere aleatoriamente y sea único para cada ejecución.
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
```
|
||||
```{:copy}
|
||||
::{endtoken}::
|
||||
```
|
||||
|
||||
### Ejemplo deteniendo e iniciando los comandos de un flujo de trabajo
|
||||
### Example: Stopping and starting workflow commands
|
||||
|
||||
{% bash %}
|
||||
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
```yaml{:copy}
|
||||
jobs:
|
||||
workflow-command-job:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: disable workflow commands
|
||||
- name: Disable workflow commands
|
||||
run: |
|
||||
echo '::warning:: this is a warning'
|
||||
echo "::stop-commands::`echo -n ${{ github.token }} | sha256sum | head -c 64`"
|
||||
echo '::warning:: this will NOT be a warning'
|
||||
echo "::`echo -n ${{ github.token }} | sha256sum | head -c 64`::"
|
||||
echo '::warning:: this is a warning again'
|
||||
echo '::warning:: This is a warning message, to demonstrate that commands are being processed.'
|
||||
stopMarker=$(uuidgen)
|
||||
echo "::stop-commands::$stopMarker"
|
||||
echo '::warning:: This will NOT be rendered as a warning, because stop-commands has been invoked.'
|
||||
echo "::$stopMarker::"
|
||||
echo '::warning:: This is a warning again, because stop-commands has been turned off.'
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
{% raw %}
|
||||
```yaml{:copy}
|
||||
jobs:
|
||||
workflow-command-job:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Disable workflow commands
|
||||
run: |
|
||||
Write-Output '::warning:: This is a warning message, to demonstrate that commands are being processed.'
|
||||
$stopMarker = New-Guid
|
||||
Write-Output "::stop-commands::$stopMarker"
|
||||
Write-Output '::warning:: This will NOT be rendered as a warning, because stop-commands has been invoked.'
|
||||
Write-Output "::$stopMarker::"
|
||||
Write-Output '::warning:: This is a warning again, because stop-commands has been turned off.'
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
## Hacer eco en las salidas de comando
|
||||
|
||||
```
|
||||
Habilita o inhabilita el hacer eco en los comandos de los flujos de trabajo. Por ejemplo, si utilizas el comando `set-output` en un flujo de trabajo, este configura un parámetro de salida pero la bitácora de la ejecución del flujo de trabajo no muestra al comando mismo. Si habilitas el eco del comando, entonces la bitácora lo mostrará, tal como en `::set-output name={name}::{value}`.
|
||||
|
||||
```{:copy}
|
||||
::echo::on
|
||||
::echo::off
|
||||
```
|
||||
|
||||
Habilita o inhabilita el hacer eco en los comandos de los flujos de trabajo. Por ejemplo, si utilizas el comando `set-output` en un flujo de trabajo, este configura un parámetro de salida pero la bitácora de la ejecución del flujo de trabajo no muestra al comando mismo. Si habilitas el eco del comando, entonces la bitácora lo mostrará, tal como en `::set-output name={name}::{value}`.
|
||||
|
||||
El eco de comando se encuentra inhabilitado predeterminadamente. Sin embargo, los comandos de flujo de trabajo hacen eco si existen errores para procesarlos.
|
||||
|
||||
Los comandos `add-mask`, `debug`, `warning` y `error` no son compatibles con el eco porque sus salidas ya hicieron eco en la bitácora.
|
||||
|
||||
También puedes habilitar el eco de comandos globalmente si activas la generación de bitácoras de depuración de pasos utilizando el secreto `ACTIONS_STEP_DEBUG`. Para obtener más información, consulta la sección "[Habilitar el registro de depuración](/actions/managing-workflow-runs/enabling-debug-logging)". Como contraste, el comando de flujo de trabajo `echo` te permite habilitar el eco de comandos en un nivel más granular en vez de habilitarlo para cada flujo de trabajo en un repositorio.
|
||||
|
||||
### Ejemplo de cómo alternar el eco de comandos
|
||||
### Example: Toggling command echoing
|
||||
|
||||
```yaml
|
||||
{% bash %}
|
||||
|
||||
```yaml{:copy}
|
||||
jobs:
|
||||
workflow-command-job:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -279,9 +464,29 @@ jobs:
|
||||
echo '::set-output name=action_echo::disabled'
|
||||
```
|
||||
|
||||
El paso anterior imprime las siguientes líneas en la bitácora:
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```yaml{:copy}
|
||||
jobs:
|
||||
workflow-command-job:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: toggle workflow command echoing
|
||||
run: |
|
||||
write-output "::set-output name=action_echo::disabled"
|
||||
write-output "::echo::on"
|
||||
write-output "::set-output name=action_echo::enabled"
|
||||
write-output "::echo::off"
|
||||
write-output "::set-output name=action_echo::disabled"
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
The example above prints the following lines to the log:
|
||||
|
||||
```{:copy}
|
||||
::set-output name=action_echo::enabled
|
||||
::echo::off
|
||||
```
|
||||
@@ -298,13 +503,13 @@ El comando `save-state` solo puede ejecutarse dentro de una acción y no está d
|
||||
|
||||
Este ejemplo utiliza JavaScript para ejecutar el comando `save-state`. La variable de ambiente resultante se nombra `STATE_processID` con el valor de `12345`:
|
||||
|
||||
``` javascript
|
||||
```javascript{:copy}
|
||||
console.log('::save-state name=processID::12345')
|
||||
```
|
||||
|
||||
La variable `STATE_processID` se encontrará entonces exclusivamente disponible para el script de limpieza que se ejecuta bajo la acción `main`. Este ejemplo se ejecuta en `main` y utiliza JavaScript para mostrar el valor asignado a la variable de ambiente `STATE_processID`:
|
||||
|
||||
``` javascript
|
||||
```javascript{:copy}
|
||||
console.log("The running PID from the main action is: " + process.env.STATE_processID);
|
||||
```
|
||||
|
||||
@@ -312,37 +517,70 @@ console.log("The running PID from the main action is: " + process.env.STATE_pro
|
||||
|
||||
Durante la ejecución de un flujo de trabajo, el ejecutor genera archivos temporales que pueden utilizarse para llevar a cabo ciertas acciones. La ruta a estos archivos se expone a través de variables de ambiente. Necesitarás utilizar codificación UTF-8 cuando escribas en estos archivos para garantizar el procesamiento adecuado de los comandos. Se pueden escribir varios comandos en el mismo archivo, separados por líneas nuevas.
|
||||
|
||||
{% warning %}
|
||||
{% powershell %}
|
||||
|
||||
**Advertencia:** en Windows, el PowerShell tradicional (`shell: powershell`) no utiliza el cifrado UTF-8 predeterminado.
|
||||
{% note %}
|
||||
|
||||
When using `shell: powershell`, you must specify UTF-8 encoding. Por ejemplo:
|
||||
**Note:** PowerShell versions 5.1 and below (`shell: powershell`) do not use UTF-8 by default, so you must specify the UTF-8 encoding. Por ejemplo:
|
||||
|
||||
```yaml
|
||||
```yaml{:copy}
|
||||
jobs:
|
||||
legacy-powershell-example:
|
||||
uses: windows-2019
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- shell: powershell
|
||||
run: echo "mypath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
run: |
|
||||
"mypath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
```
|
||||
|
||||
Alternatively, you can use PowerShell Core (`shell: pwsh`), which defaults to UTF-8.
|
||||
PowerShell Core versions 6 and higher (`shell: pwsh`) use UTF-8 by default. Por ejemplo:
|
||||
|
||||
{% endwarning %}
|
||||
```yaml{:copy}
|
||||
jobs:
|
||||
powershell-core-example:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- shell: pwsh
|
||||
run: |
|
||||
"mypath" >> $env:GITHUB_PATH
|
||||
```
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
## Configurar una variable de ambiente
|
||||
|
||||
``` bash
|
||||
{% bash %}
|
||||
|
||||
```bash{:copy}
|
||||
echo "{environment_variable_name}={value}" >> $GITHUB_ENV
|
||||
```
|
||||
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
- Using PowerShell version 6 and higher:
|
||||
```pwsh{:copy}
|
||||
"{environment_variable_name}={value}" >> $env:GITHUB_ENV
|
||||
```
|
||||
|
||||
- Using PowerShell version 5.1 and below:
|
||||
```powershell{:copy}
|
||||
"{environment_variable_name}={value}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
You can make an environment variable available to any subsequent steps in a workflow job by defining or updating the environment variable and writing this to the `GITHUB_ENV` environment file. El paso que crea o actualiza la variable de ambiente no tiene acceso al valor nuevo, pero todos los pasos subsecuentes en un job tendrán acceso. The names of environment variables are case-sensitive, and you can include punctuation. Para obtener más información, consulta "[Variables del entorno](/actions/learn-github-actions/environment-variables)".
|
||||
|
||||
### Ejemplo
|
||||
|
||||
{% bash %}
|
||||
|
||||
{% raw %}
|
||||
```
|
||||
```yaml{:copy}
|
||||
steps:
|
||||
- name: Set the value
|
||||
id: step_one
|
||||
@@ -355,11 +593,31 @@ steps:
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
{% raw %}
|
||||
```yaml{:copy}
|
||||
steps:
|
||||
- name: Set the value
|
||||
id: step_one
|
||||
run: |
|
||||
"action_state=yellow" >> $env:GITHUB_ENV
|
||||
- name: Use the value
|
||||
id: step_two
|
||||
run: |
|
||||
Write-Output "${{ env.action_state }}" # This will output 'yellow'
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
### Secuencias de línea múltiple
|
||||
|
||||
Para las secuencias de lìnea mùltiple, puedes utilizar un delimitador con la siguiente sintaxis.
|
||||
|
||||
```
|
||||
```{:copy}
|
||||
{name}<<{delimiter}
|
||||
{value}
|
||||
{delimiter}
|
||||
@@ -367,29 +625,75 @@ Para las secuencias de lìnea mùltiple, puedes utilizar un delimitador con la s
|
||||
|
||||
#### Ejemplo
|
||||
|
||||
En este ejemplo, utilizamos `EOF` como delimitador y configuramos la variable de ambiente `JSON_RESPONSE` para el valor de la respuesta de curl.
|
||||
```yaml
|
||||
This example uses `EOF` as a delimiter, and sets the `JSON_RESPONSE` environment variable to the value of the `curl` response.
|
||||
|
||||
{% bash %}
|
||||
|
||||
```yaml{:copy}
|
||||
steps:
|
||||
- name: Set the value
|
||||
- name: Set the value in bash
|
||||
id: step_one
|
||||
run: |
|
||||
echo 'JSON_RESPONSE<<EOF' >> $GITHUB_ENV
|
||||
curl https://httpbin.org/json >> $GITHUB_ENV
|
||||
curl https://example.lab >> $GITHUB_ENV
|
||||
echo 'EOF' >> $GITHUB_ENV
|
||||
```
|
||||
|
||||
## Agregar una ruta de sistema
|
||||
{% endbash %}
|
||||
|
||||
``` bash
|
||||
echo "{path}" >> $GITHUB_PATH
|
||||
{% powershell %}
|
||||
|
||||
```yaml{:copy}
|
||||
steps:
|
||||
- name: Set the value in pwsh
|
||||
id: step_one
|
||||
run: |
|
||||
"JSON_RESPONSE<<EOF" >> $env:GITHUB_ENV
|
||||
(Invoke-WebRequest -Uri "https://example.lab").Content >> $env:GITHUB_ENV
|
||||
"EOF" >> $env:GITHUB_ENV
|
||||
shell: pwsh
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
## Agregar una ruta de sistema
|
||||
|
||||
Antepone un directorio a la variable de sistema `PATH` y la hace disponible automáticamente para todas las acciones subsecuentes en el job actual; la acción que se está ejecutando actualmente no puede acceder a la variable de ruta actualizada. Para ver las rutas definidas actualmente para tu job, puedes utilizar `echo "$PATH"` en un paso o en una acción.
|
||||
|
||||
{% bash %}
|
||||
|
||||
```bash{:copy}
|
||||
echo "{path}" >> $GITHUB_PATH
|
||||
```
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```pwsh{:copy}
|
||||
"{path}" >> $env:GITHUB_PATH
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
### Ejemplo
|
||||
|
||||
Este ejemplo demuestra cómo agregar el directorio `$HOME/.local/bin` del usuario al `PATH`:
|
||||
|
||||
``` bash
|
||||
{% bash %}
|
||||
|
||||
```bash{:copy}
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
```
|
||||
|
||||
{% endbash %}
|
||||
|
||||
|
||||
This example demonstrates how to add the user `$env:HOMEPATH/.local/bin` directory to `PATH`:
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```pwsh{:copy}
|
||||
"$env:HOMEPATH/.local/bin" >> $env:GITHUB_PATH
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
@@ -17,7 +17,11 @@ topics:
|
||||
|
||||
Si configuras un nombre del host en lugar de una dirección IP codificada de forma rígida, podrás cambiar el hardware físico que ejecuta {% data variables.product.product_location %} sin afectar a los usuarios o al software del cliente.
|
||||
|
||||
La configuración del nombre de host en la {% data variables.enterprise.management_console %} debe ajustarse a un nombre de dominio adecuado y que cumpla con todos los requisitos (FQDN) el cual se pueda resolver en la internet o dentro de tu red interna. Por ejemplo, tu configuración de nombre del host podría ser `github.companyname.com.` También recomendamos habilitar el aislamiento de subdominio para el nombre del host elegido a fin de mitigar varias vulnerabilidades del estilo cross-site scripting. Para obtener más información, consulta [Sección 2.1 del HTTP RFC](https://tools.ietf.org/html/rfc1123#section-2).
|
||||
La configuración del nombre de host en la {% data variables.enterprise.management_console %} debe ajustarse a un nombre de dominio adecuado y que cumpla con todos los requisitos (FQDN) el cual se pueda resolver en la internet o dentro de tu red interna. For example, your hostname setting could be `github.companyname.com.` Web and API requests will automatically redirect to the hostname configured in the {% data variables.enterprise.management_console %}.
|
||||
|
||||
After you configure a hostname, you can enable subdomain isolation to further increase the security of {% data variables.product.product_location %}. Para obtener más información, consulta "[Habilitar el aislamiento de subdominio](/enterprise/{{ currentVersion }}/admin/guides/installation/enabling-subdomain-isolation/)."
|
||||
|
||||
For more information on the supported hostname types, see [Section 2.1 of the HTTP RFC](https://tools.ietf.org/html/rfc1123#section-2).
|
||||
|
||||
{% data reusables.enterprise_installation.changing-hostname-not-supported %}
|
||||
|
||||
@@ -29,4 +33,4 @@ La configuración del nombre de host en la {% data variables.enterprise.manageme
|
||||
{% data reusables.enterprise_management_console.test-domain-settings-failure %}
|
||||
{% data reusables.enterprise_management_console.save-settings %}
|
||||
|
||||
Después de configurar un nombre del host, recomendamos que habilites el aislamiento de subdominio para {% data variables.product.product_location %}. Para obtener más información, consulta "[Habilitar el aislamiento de subdominio](/enterprise/{{ currentVersion }}/admin/guides/installation/enabling-subdomain-isolation/)."
|
||||
To help mitigate various cross-site scripting vulnerabilities, we recommend that you enable subdomain isolation for {% data variables.product.product_location %} after you configure a hostname. Para obtener más información, consulta "[Habilitar el aislamiento de subdominio](/enterprise/{{ currentVersion }}/admin/guides/installation/enabling-subdomain-isolation/)."
|
||||
|
||||
@@ -19,25 +19,32 @@ El tiempo requerido para la tolerancia de fallos depende de cuánto le tome para
|
||||
|
||||
{% data reusables.enterprise_installation.promoting-a-replica %}
|
||||
|
||||
1. Para permitir que la replicación finalice antes de cambiar aparatos, pon el aparato principal en modo mantenimiento:
|
||||
- Para usar el administrador de consola, consulta "[Habilitar y programar el modo mantenimiento](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode/)"
|
||||
- También puedes usar el comando `ghe-maintenance -s`.
|
||||
1. If the primary appliance is available, to allow replication to finish before you switch appliances, on the primary appliance, put the primary appliance into maintenance mode.
|
||||
|
||||
- Put the appliance into maintenance mode.
|
||||
|
||||
- Para usar el administrador de consola, consulta "[Habilitar y programar el modo mantenimiento](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode/)"
|
||||
|
||||
- También puedes usar el comando `ghe-maintenance -s`.
|
||||
```shell
|
||||
$ ghe-maintenance -s
|
||||
```
|
||||
|
||||
- Cuando la cantidad de operaciones activas de Git, consultas de MySQL y jobs de Resque lleguen a cero, espera 30 segundos.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Nota:** Nomad siempre tendrá jobs en ejecución, incluso si está en modo de mantenimiento, así que puedes ignorar estos jobs de forma segura.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
- Para verificar que todos los canales de replicación informan `OK`, utiliza el comando `ghe-repl-status -vv`.
|
||||
|
||||
```shell
|
||||
$ ghe-maintenance -s
|
||||
$ ghe-repl-status -vv
|
||||
```
|
||||
2. Cuando la cantidad de operaciones activas de Git, consultas de MySQL y jobs de Resque lleguen a cero, espera 30 segundos.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Nota:** Nomad siempre tendrá jobs en ejecución, incluso si está en modo de mantenimiento, así que puedes ignorar estos jobs de forma segura.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
3. Para verificar que todos los canales de replicación informan `OK`, utiliza el comando `ghe-repl-status -vv`.
|
||||
```shell
|
||||
$ ghe-repl-status -vv
|
||||
```
|
||||
4. Para frenar la replicación e impulsar el aparato de réplica a un estado primario, utiliza el comando `ghe-repl-promote`. Esto también pondrá de forma automática al nodo primario en nodo mantenimiento si es accesible.
|
||||
4. On the replica appliance, to stop replication and promote the replica appliance to primary status, use the `ghe-repl-promote` command. Esto también pondrá de forma automática al nodo primario en nodo mantenimiento si es accesible.
|
||||
```shell
|
||||
$ ghe-repl-promote
|
||||
```
|
||||
|
||||
@@ -25,7 +25,7 @@ Existen tres tipos de migraciones que se pueden realizar:
|
||||
|
||||
En una migración, todo gira en torno a un repositorio. La mayoría de los datos asociados con un repositorio se pueden migrar. Por ejemplo, un repositorio dentro de una organización migrará el repositorio *y* la organización, así como los usuarios, equipos, propuestas y solicitudes de extracción asociados con el repositorio.
|
||||
|
||||
Los elementos de la tabla a continuación se pueden migrar con un repositorio. Los elementos que no se muestren en la lista de datos migrados no se pueden migrar.
|
||||
Los elementos de la tabla a continuación se pueden migrar con un repositorio. Any items not shown in the list of migrated data can not be migrated, including {% data variables.large_files.product_name_short %} assets.
|
||||
|
||||
{% data reusables.enterprise_migrations.fork-persistence %}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ shortTitle: Verificar la llave SSH existente
|
||||
# Lists the files in your .ssh directory, if they exist
|
||||
```
|
||||
|
||||
3. Comprueba la lista de directorio para ver si ya tiene una clave SSH pública. Predeterminadamente, {% ifversion ghae %}el nombre de archivo de una llave pública para {% data variables.product.product_name %} es *id_rsa.pub*.{% elsif fpt or ghes %}los nombres de archivo de las llaves públicas compatibles para {% data variables.product.product_name %} son una de las siguientes.
|
||||
3. Comprueba la lista de directorio para ver si ya tiene una clave SSH pública. Predeterminadamente, {% ifversion ghae %}el nombre de archivo de una llave pública para {% data variables.product.product_name %} es *id_rsa.pub*.{% else %}los nombres de archivo de las llaves públicas compatibles para {% data variables.product.product_name %} son una de las siguientes.
|
||||
- *id_rsa.pub*
|
||||
- *id_ecdsa.pub*
|
||||
- *id_ed25519.pub*{% endif %}
|
||||
|
||||
@@ -33,7 +33,7 @@ Si eso funcionó, ¡fantástico! De lo contrario, puede que debas [seguir nuestr
|
||||
|
||||
Si puedes ingresar a `git@ssh.{% data variables.command_line.backticks %}` por SSH a través del puerto 443, podrás reemplazar los parámetros SSH para forzar que cualquier conexión a {% data variables.product.product_location %} se ejecute a través de ese servidor y puerto.
|
||||
|
||||
Para configurar esto en tu archivo de configuración SSH, edita el archivo en `~/.ssh/config` y agrega esta sección:
|
||||
To set this in your SSH configuration file, edit the file at `~/.ssh/config`, and add this section:
|
||||
|
||||
```
|
||||
Host {% data variables.command_line.codeblock %}
|
||||
|
||||
@@ -31,9 +31,9 @@ If your project communicates with an external service, you might use a token or
|
||||
{% ifversion fpt or ghec %}
|
||||
{% data variables.product.prodname_secret_scanning_caps %} is available on {% data variables.product.prodname_dotcom_the_website %} in two forms:
|
||||
|
||||
1. **{% data variables.product.prodname_secret_scanning_partner_caps %}.** Runs automatically on all public repositories. Any strings that match patterns that were provided by secret scanning partners are reported directly to the relvant partner.
|
||||
1. **{% data variables.product.prodname_secret_scanning_partner_caps %}.** Runs automatically on all public repositories. Any strings that match patterns that were provided by secret scanning partners are reported directly to the relevant partner.
|
||||
|
||||
2. **{% data variables.product.prodname_secret_scanning_GHAS_caps %}.** You can enable and configure additional scanning for repositories owned by organizations that use {% data variables.product.prodname_ghe_cloud %} and have a license for {% data variables.product.prodname_GH_advanced_security %}. Any strings that match patterns provided by secret scannng partners, by other service providers, or defined by your organization are reported as alerts in the "Security" tab of repositories. If a string in a public repository matches a partner pattern, it is also reported to the partner.
|
||||
2. **{% data variables.product.prodname_secret_scanning_GHAS_caps %}.** You can enable and configure additional scanning for repositories owned by organizations that use {% data variables.product.prodname_ghe_cloud %} and have a license for {% data variables.product.prodname_GH_advanced_security %}. Any strings that match patterns provided by secret scanning partners, by other service providers, or defined by your organization, are reported as alerts in the "Security" tab of repositories. If a string in a public repository matches a partner pattern, it is also reported to the partner.
|
||||
{% endif %}
|
||||
|
||||
Service providers can partner with {% data variables.product.company_short %} to provide their secret formats for scanning. {% data reusables.secret-scanning.partner-program-link %}
|
||||
|
||||
@@ -21,7 +21,7 @@ topics:
|
||||
---
|
||||
## About forks
|
||||
|
||||
Most commonly, forks are used to either propose changes to someone else's project or to use someone else's project as a starting point for your own idea. You can fork a repository to create a copy of the repository and make changes without affecting the upstream repository. For more information, see "[Working with forks](/github/collaborating-with-issues-and-pull-requests/working-with-forks)."
|
||||
Most commonly, forks are used to either propose changes to someone else's project to which you don't have write access, or to use someone else's project as a starting point for your own idea. You can fork a repository to create a copy of the repository and make changes without affecting the upstream repository. For more information, see "[Working with forks](/github/collaborating-with-issues-and-pull-requests/working-with-forks)."
|
||||
|
||||
### Propose changes to someone else's project
|
||||
|
||||
|
||||
@@ -16,9 +16,11 @@ topics:
|
||||
- Pull requests
|
||||
shortTitle: Request a PR review
|
||||
---
|
||||
Owners and collaborators on a repository owned by a user account can assign pull request reviews. Organization members with triage permissions to a repository can assign a pull request review.
|
||||
Repositories belong to a personal account (a single individual owner) or an organization account (a shared account with numerous collaborators or maintainers). For more information, see "[Types of {% data variables.product.prodname_dotcom %} accounts](/get-started/learning-about-github/types-of-github-accounts)." Owners and collaborators on a repository owned by a personal account can assign pull request reviews. Organization members with triage permissions can also assign a reviewer for a pull request.
|
||||
|
||||
Owners or collaborators can assign a pull request review to any person that has been explicitly granted [read access](/articles/access-permissions-on-github) to a user-owned repository. Organization members can assign a pull request review to any person or team with read access to a repository. The requested reviewer or team will receive a notification that you asked them to review the pull request. {% ifversion fpt or ghae or ghes or ghec %}If you request a review from a team and code review assignment is enabled, specific members will be requested and the team will be removed as a reviewer. For more information, see "[Managing code review settings for your team](/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team)."{% endif %}
|
||||
To assign a reviewer to a pull request, you will need write access to the repository. For more information about repository access, see "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)." If you have write access, you can assign anyone who has read access to the repository as a reviewer.
|
||||
|
||||
Organization members with write access can also assign a pull request review to any person or team with read access to a repository. The requested reviewer or team will receive a notification that you asked them to review the pull request. {% ifversion fpt or ghae or ghes or ghec %}If you request a review from a team and code review assignment is enabled, specific members will be requested and the team will be removed as a reviewer. For more information, see "[Managing code review settings for your team](/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team)."{% endif %}
|
||||
|
||||
{% note %}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ Each CODEOWNERS file assigns the code owners for a single branch in the reposito
|
||||
|
||||
For code owners to receive review requests, the CODEOWNERS file must be on the base branch of the pull request. For example, if you assign `@octocat` as the code owner for *.js* files on the `gh-pages` branch of your repository, `@octocat` will receive review requests when a pull request with changes to *.js* files is opened between the head branch and `gh-pages`.
|
||||
|
||||
{% ifversion fpt or ghec or ghes > 3.2 or ghae-issue-9273 %}
|
||||
{% ifversion fpt or ghec or ghes > 3.2 or ghae-issue-4675 %}
|
||||
## CODEOWNERS file size
|
||||
|
||||
CODEOWNERS files must be under 3 MB in size. A CODEOWNERS file over this limit will not be loaded, which means that code owner information is not shown and the appropriate code owners will not be requested to review changes in a pull request.
|
||||
|
||||
@@ -7,7 +7,7 @@ versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
ghes: '>3.2'
|
||||
ghae-issue-4974: '*'
|
||||
ghae: issue-4974
|
||||
topics:
|
||||
- Repositories
|
||||
---
|
||||
|
||||
@@ -33,6 +33,7 @@ sections:
|
||||
- 'El último lanzamiento del CLI de CodeQL es compatible con subir los resultados del análisis a GitHub. esto facilita ejecutar el análisis de código para los clientes que quieran utilizar sistemas de IC/DC diferentes a los de {% data variables.product.prodname_actions %}. Anteriormente, estos usuarios tenían que utilizar un ejecutor de CodeQL por separado, el cual aún estará disponible. Para obtener más información, consulta la sección [Acerca del escaneo de código de CodeQL en tu sistema de IC](/enterprise-server@3.1/code-security/secure-coding/about-codeql-code-scanning-in-your-ci-system)".'
|
||||
- '{% data variables.product.prodname_actions %} es ahora compatible con saltar los flujos de trabajo de tipo `push` y `pull_request` si se buscan las palabras clave en común dentro de tu mensaje de confirmación.'
|
||||
- 'Se archivará las anotaciones de verificación más antiguas a cuatro meses.'
|
||||
- 'Scaling of worker allocation for background tasks has been revised. We recommend validating that the new defaults are appropriate for your workload. Custom background worker overrides should be unset in most cases. [Updated 2022-03-18]'
|
||||
- heading: 'Cambios de seguridad'
|
||||
notes:
|
||||
- 'Siguiendo la retroalimentación, seguirá habiendo compatibilidad para mostrar los resultados del escaneo de código en una solicitud de cambios sin emitirlos con una ID de esta. Para obtener más información, consulta las secciones "[Configurar el escaneo de código](/enterprise-server@3.1/code-security/secure-coding/configuring-code-scanning#scanning-pull-requests)" y "[Configurar el escaneo de código de CodeQL en tu sistema de IC](/enterprise-server@3.1/code-security/secure-coding/configuring-codeql-code-scanning-in-your-ci-system#scanning-pull-requests).'
|
||||
|
||||
@@ -29,6 +29,11 @@ sections:
|
||||
notes:
|
||||
- |
|
||||
El {% data variables.product.prodname_dependabot %} ahora está disponible en {% data variables.product.prodname_ghe_server %} 3.4 como un beta público y ofrece tanto actualziaciones de versión como de seguridad para varios ecosistemas populares. El {% data variables.product.prodname_dependabot %} en {% data variables.product.prodname_ghe_server %} requiere {% data variables.product.prodname_actions %} y un conjunto de ejecutores auto-hospedados configurado para que el mismo {% data variables.product.prodname_dependabot %} los utilice. El {% data variables.product.prodname_dependabot %} en {% data variables.product.prodname_ghe_server %} también requiere que un administrador habilite tanto {% data variables.product.prodname_github_connect %} como el mismo {% data variables.product.prodname_dependabot %}. Puedes compartir tu retroalimentación y sugerencias en el [Debate de GitHub sobre la retroalimentación para el {% data variables.product.prodname_dependabot %}](https://github.com/github/feedback/discussions/categories/dependabot-feedback). Para obtener más información y probar el beta, consulta la sección "[Configurar la seguridad y las actualizaciones de versión del {% data variables.product.prodname_dependabot %} en tu empresa](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/setting-up-dependabot-updates)".
|
||||
-
|
||||
heading: SAML authentication supports encrypted assertions
|
||||
notes:
|
||||
- |
|
||||
If you use SAML authentication for {% data variables.product.prodname_ghe_server %}, you can now configure encrypted assertions from your IdP to improve security. Encrypted assertions add an additional layer of encryption when your IdP transmits information to {% data variables.product.product_location %}. For more information, see "[Using SAML](/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-saml#enabling-encrypted-assertions)."
|
||||
changes:
|
||||
-
|
||||
heading: Cambios en la administración
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{% ifversion ghae %}
|
||||
{% ifversion ghae-issue-5752 %}
|
||||
|
||||
<!-- Remove this reusable and all references for GA release -->
|
||||
|
||||
{% elsif ghae %}
|
||||
|
||||
{% note %}
|
||||
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{% ifversion ghae %}
|
||||
{% ifversion ghae-issue-5752 %}
|
||||
|
||||
<!-- Remove this reusable and all references for GA release -->
|
||||
|
||||
{% elsif ghae %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Nota:** Las {% data variables.product.prodname_secret_scanning_caps %} para los repositorios que pertenecen a organizaciones se encuentra actualmente en beta y está sujeta a cambios.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
title: GitHub Actionsのワークフローコマンド
|
||||
shortTitle: ワークフロー コマンド
|
||||
intro: ワークフロー内あるいはアクションのコード内でシェルコマンドを実行する際には、ワークフローコマンドを利用できます。
|
||||
defaultTool: bash
|
||||
redirect_from:
|
||||
- /articles/development-tools-for-github-actions
|
||||
- /github/automating-your-workflow-with-github-actions/development-tools-for-github-actions
|
||||
@@ -26,10 +27,24 @@ versions:
|
||||
|
||||
ほとんどのワークフローコマンドは特定の形式で `echo` コマンドを使用しますが、他のワークフローコマンドはファイルへの書き込みによって呼び出されます。 詳しい情報については、「[環境ファイル](#environment-files)」を参照してください。
|
||||
|
||||
``` bash
|
||||
### サンプル
|
||||
|
||||
{% bash %}
|
||||
|
||||
```bash{:copy}
|
||||
echo "::workflow-command parameter1={data},parameter2={data}::{command value}"
|
||||
```
|
||||
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```pwsh{:copy}
|
||||
Write-Output "::workflow-command parameter1={data},parameter2={data}::{command value}"
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**ノート:** ワークフローコマンドおよびパラメータ名では、大文字と小文字は区別されません。
|
||||
@@ -46,14 +61,18 @@ echo "::workflow-command parameter1={data},parameter2={data}::{command value}"
|
||||
|
||||
[actions/toolkit](https://github.com/actions/toolkit)には、ワークフローコマンドとして実行できる多くの関数があります。 `::`構文を使って、YAMLファイル内でワークフローコマンドを実行してください。それらのコマンドは`stdout`を通じてランナーに送信されます。 たとえば、コードを使用して出力を設定する代わりに、以下のようにします。
|
||||
|
||||
```javascript
|
||||
```javascript{:copy}
|
||||
core.setOutput('SELECTED_COLOR', 'green');
|
||||
```
|
||||
|
||||
### Example: Setting a value
|
||||
|
||||
ワークフローで `set-output` コマンドを使用して、同じ値を設定できます。
|
||||
|
||||
{% bash %}
|
||||
|
||||
{% raw %}
|
||||
``` yaml
|
||||
```yaml{:copy}
|
||||
- name: Set selected color
|
||||
run: echo '::set-output name=SELECTED_COLOR::green'
|
||||
id: random-color-generator
|
||||
@@ -62,6 +81,22 @@ core.setOutput('SELECTED_COLOR', 'green');
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
{% raw %}
|
||||
```yaml{:copy}
|
||||
- name: Set selected color
|
||||
run: Write-Output "::set-output name=SELECTED_COLOR::green"
|
||||
id: random-color-generator
|
||||
- name: Get color
|
||||
run: Write-Output "The selected color is ${{ steps.random-color-generator.outputs.SELECTED_COLOR }}"
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
以下の表は、ワークフロー内で使えるツールキット関数を示しています。
|
||||
|
||||
| ツールキット関数 | 等価なワークフローのコマンド |
|
||||
@@ -86,186 +121,336 @@ core.setOutput('SELECTED_COLOR', 'green');
|
||||
|
||||
## 出力パラメータの設定
|
||||
|
||||
```
|
||||
アクションの出力パラメータを設定します。
|
||||
|
||||
```{:copy}
|
||||
::set-output name={name}::{value}
|
||||
```
|
||||
|
||||
アクションの出力パラメータを設定します。
|
||||
|
||||
あるいは、出力パラメータをアクションのメタデータファイル中で宣言することもできます。 For more information, see "[Metadata syntax for {% data variables.product.prodname_actions %}](/articles/metadata-syntax-for-github-actions#outputs-for-docker-container-and-javascript-actions)."
|
||||
|
||||
### サンプル
|
||||
### Example: Setting an output parameter
|
||||
|
||||
``` bash
|
||||
{% bash %}
|
||||
|
||||
```bash{:copy}
|
||||
echo "::set-output name=action_fruit::strawberry"
|
||||
```
|
||||
|
||||
## デバッグメッセージの設定
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```pwsh{:copy}
|
||||
Write-Output "::set-output name=action_fruit::strawberry"
|
||||
```
|
||||
::debug::{message}
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
## デバッグメッセージの設定
|
||||
|
||||
デバッグメッセージをログに出力します。 ログでこのコマンドにより設定されたデバッグメッセージを表示するには、`ACTIONS_STEP_DEBUG` という名前のシークレットを作成し、値を `true` に設定する必要があります。 詳しい情報については、「[デバッグログの有効化](/actions/managing-workflow-runs/enabling-debug-logging)」を参照してください。
|
||||
|
||||
### サンプル
|
||||
```{:copy}
|
||||
::debug::{message}
|
||||
```
|
||||
|
||||
``` bash
|
||||
### Example: Setting a debug message
|
||||
|
||||
{% bash %}
|
||||
|
||||
```bash{:copy}
|
||||
echo "::debug::Set the Octocat variable"
|
||||
```
|
||||
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```pwsh{:copy}
|
||||
Write-Output "::debug::Set the Octocat variable"
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
{% ifversion fpt or ghes > 3.2 or ghae-issue-4929 or ghec %}
|
||||
|
||||
## Setting a notice message
|
||||
|
||||
```
|
||||
Creates a notice message and prints the message to the log. {% data reusables.actions.message-annotation-explanation %}
|
||||
|
||||
```{:copy}
|
||||
::notice file={name},line={line},endLine={endLine},title={title}::{message}
|
||||
```
|
||||
|
||||
Creates a notice message and prints the message to the log. {% data reusables.actions.message-annotation-explanation %}
|
||||
|
||||
{% data reusables.actions.message-parameters %}
|
||||
|
||||
### サンプル
|
||||
### Example: Setting a notice message
|
||||
|
||||
``` bash
|
||||
{% bash %}
|
||||
|
||||
```bash{:copy}
|
||||
echo "::notice file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
|
||||
```
|
||||
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```pwsh{:copy}
|
||||
Write-Output "::notice file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
{% endif %}
|
||||
|
||||
## 警告メッセージの設定
|
||||
|
||||
```
|
||||
警告メッセージを作成し、ログにそのメッセージを出力します。 {% data reusables.actions.message-annotation-explanation %}
|
||||
|
||||
```{:copy}
|
||||
::warning file={name},line={line},endLine={endLine},title={title}::{message}
|
||||
```
|
||||
|
||||
警告メッセージを作成し、ログにそのメッセージを出力します。 {% data reusables.actions.message-annotation-explanation %}
|
||||
|
||||
{% data reusables.actions.message-parameters %}
|
||||
|
||||
### サンプル
|
||||
### Example: Setting a warning message
|
||||
|
||||
``` bash
|
||||
{% bash %}
|
||||
|
||||
```bash{:copy}
|
||||
echo "::warning file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
|
||||
```
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```pwsh{:copy}
|
||||
Write-Output "::warning file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
## エラーメッセージの設定
|
||||
|
||||
```
|
||||
エラーメッセージを作成し、ログにそのメッセージを出力します。 {% data reusables.actions.message-annotation-explanation %}
|
||||
|
||||
```{:copy}
|
||||
::error file={name},line={line},endLine={endLine},title={title}::{message}
|
||||
```
|
||||
|
||||
エラーメッセージを作成し、ログにそのメッセージを出力します。 {% data reusables.actions.message-annotation-explanation %}
|
||||
|
||||
{% data reusables.actions.message-parameters %}
|
||||
|
||||
### サンプル
|
||||
### Example: Setting an error message
|
||||
|
||||
``` bash
|
||||
{% bash %}
|
||||
|
||||
```bash{:copy}
|
||||
echo "::error file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
|
||||
```
|
||||
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```pwsh{:copy}
|
||||
Write-Output "::error file=app.js,line=1,col=5,endColumn=7::Missing semicolon"
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
## ログの行のグループ化
|
||||
|
||||
```
|
||||
展開可能なグループをログ中に作成します。 グループを作成するには、`group`コマンドを使って`title`を指定してください。 `group`と`endgroup`コマンド間でログに出力したすべての内容は、ログ中の展開可能なエントリ内にネストされます。
|
||||
|
||||
```{:copy}
|
||||
::group::{title}
|
||||
::endgroup::
|
||||
```
|
||||
|
||||
展開可能なグループをログ中に作成します。 グループを作成するには、`group`コマンドを使って`title`を指定してください。 `group`と`endgroup`コマンド間でログに出力したすべての内容は、ログ中の展開可能なエントリ内にネストされます。
|
||||
### Example: Grouping log lines
|
||||
|
||||
### サンプル
|
||||
{% bash %}
|
||||
|
||||
```bash
|
||||
echo "::group::My title"
|
||||
echo "Inside group"
|
||||
echo "::endgroup::"
|
||||
```yaml{:copy}
|
||||
jobs:
|
||||
bash-example:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Group of log lines
|
||||
run: |
|
||||
echo "::group::My title"
|
||||
echo "Inside group"
|
||||
echo "::endgroup::"
|
||||
```
|
||||
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```yaml{:copy}
|
||||
jobs:
|
||||
powershell-example:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Group of log lines
|
||||
run: |
|
||||
Write-Output "::group::My title"
|
||||
Write-Output "Inside group"
|
||||
Write-Output "::endgroup::"
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||

|
||||
|
||||
## ログ中での値のマスク
|
||||
|
||||
```
|
||||
```{:copy}
|
||||
::add-mask::{value}
|
||||
```
|
||||
|
||||
値をマスクすることにより、文字列または値がログに出力されることを防ぎます。 空白で分離された、マスクされた各語は "`*`" という文字で置き換えられます。 マスクの `value` には、環境変数または文字列を用いることができます。
|
||||
|
||||
### 文字列をマスクするサンプル
|
||||
### Example: Masking a string
|
||||
|
||||
ログに `"Mona The Octocat"` を出力すると、`"***"` が表示されます。
|
||||
|
||||
```bash
|
||||
{% bash %}
|
||||
|
||||
```bash{:copy}
|
||||
echo "::add-mask::Mona The Octocat"
|
||||
```
|
||||
|
||||
### 環境変数をマスクするサンプル
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```pwsh{:copy}
|
||||
Write-Output "::add-mask::Mona The Octocat"
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
### Example: Masking an environment variable
|
||||
|
||||
変数 `MY_NAME` または値 `"Mona The Octocat"` をログに出力すると、`"Mona The Octocat"` の代わりに `"***"` が表示されます。
|
||||
|
||||
```bash
|
||||
MY_NAME="Mona The Octocat"
|
||||
echo "::add-mask::$MY_NAME"
|
||||
{% bash %}
|
||||
|
||||
```yaml{:copy}
|
||||
jobs:
|
||||
bash-example:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
MY_NAME: "Mona The Octocat"
|
||||
steps:
|
||||
- name: bash-version
|
||||
run: echo "::add-mask::$MY_NAME"
|
||||
```
|
||||
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```yaml{:copy}
|
||||
jobs:
|
||||
powershell-example:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
MY_NAME: "Mona The Octocat"
|
||||
steps:
|
||||
- name: powershell-version
|
||||
run: Write-Output "::add-mask::$env:MY_NAME"
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
## ワークフローコマンドの停止と開始
|
||||
|
||||
`::stop-commands::{endtoken}`
|
||||
|
||||
ワークフローコマンドの処理を停止します。 この特殊コマンドを使うと、意図せずワークフローコマンドを実行することなくいかなるログも取れます。 たとえば、コメントがあるスクリプト全体を出力するためにログ取得を停止できます。
|
||||
|
||||
```{:copy}
|
||||
::stop-commands::{endtoken}
|
||||
```
|
||||
|
||||
To stop the processing of workflow commands, pass a unique token to `stop-commands`. To resume processing workflow commands, pass the same token that you used to stop workflow commands.
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Warning:** Make sure the token you're using is randomly generated and unique for each run. As demonstrated in the example below, you can generate a unique hash of your `github.token` for each run.
|
||||
**Warning:** Make sure the token you're using is randomly generated and unique for each run.
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
```
|
||||
```{:copy}
|
||||
::{endtoken}::
|
||||
```
|
||||
|
||||
### Example stopping and starting workflow commands
|
||||
### Example: Stopping and starting workflow commands
|
||||
|
||||
{% bash %}
|
||||
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
```yaml{:copy}
|
||||
jobs:
|
||||
workflow-command-job:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: disable workflow commands
|
||||
- name: Disable workflow commands
|
||||
run: |
|
||||
echo '::warning:: this is a warning'
|
||||
echo "::stop-commands::`echo -n ${{ github.token }} | sha256sum | head -c 64`"
|
||||
echo '::warning:: this will NOT be a warning'
|
||||
echo "::`echo -n ${{ github.token }} | sha256sum | head -c 64`::"
|
||||
echo '::warning:: this is a warning again'
|
||||
echo '::warning:: This is a warning message, to demonstrate that commands are being processed.'
|
||||
stopMarker=$(uuidgen)
|
||||
echo "::stop-commands::$stopMarker"
|
||||
echo '::warning:: This will NOT be rendered as a warning, because stop-commands has been invoked.'
|
||||
echo "::$stopMarker::"
|
||||
echo '::warning:: This is a warning again, because stop-commands has been turned off.'
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
{% raw %}
|
||||
```yaml{:copy}
|
||||
jobs:
|
||||
workflow-command-job:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Disable workflow commands
|
||||
run: |
|
||||
Write-Output '::warning:: This is a warning message, to demonstrate that commands are being processed.'
|
||||
$stopMarker = New-Guid
|
||||
Write-Output "::stop-commands::$stopMarker"
|
||||
Write-Output '::warning:: This will NOT be rendered as a warning, because stop-commands has been invoked.'
|
||||
Write-Output "::$stopMarker::"
|
||||
Write-Output '::warning:: This is a warning again, because stop-commands has been turned off.'
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
## Echoing command outputs
|
||||
|
||||
```
|
||||
Enables or disables echoing of workflow commands. For example, if you use the `set-output` command in a workflow, it sets an output parameter but the workflow run's log does not show the command itself. If you enable command echoing, then the log shows the command, such as `::set-output name={name}::{value}`.
|
||||
|
||||
```{:copy}
|
||||
::echo::on
|
||||
::echo::off
|
||||
```
|
||||
|
||||
Enables or disables echoing of workflow commands. For example, if you use the `set-output` command in a workflow, it sets an output parameter but the workflow run's log does not show the command itself. If you enable command echoing, then the log shows the command, such as `::set-output name={name}::{value}`.
|
||||
|
||||
Command echoing is disabled by default. However, a workflow command is echoed if there are any errors processing the command.
|
||||
|
||||
The `add-mask`, `debug`, `warning`, and `error` commands do not support echoing because their outputs are already echoed to the log.
|
||||
|
||||
You can also enable command echoing globally by turning on step debug logging using the `ACTIONS_STEP_DEBUG` secret. For more information, see "[Enabling debug logging](/actions/managing-workflow-runs/enabling-debug-logging)". In contrast, the `echo` workflow command lets you enable command echoing at a more granular level, rather than enabling it for every workflow in a repository.
|
||||
|
||||
### Example toggling command echoing
|
||||
### Example: Toggling command echoing
|
||||
|
||||
```yaml
|
||||
{% bash %}
|
||||
|
||||
```yaml{:copy}
|
||||
jobs:
|
||||
workflow-command-job:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -279,9 +464,29 @@ jobs:
|
||||
echo '::set-output name=action_echo::disabled'
|
||||
```
|
||||
|
||||
The step above prints the following lines to the log:
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```yaml{:copy}
|
||||
jobs:
|
||||
workflow-command-job:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: toggle workflow command echoing
|
||||
run: |
|
||||
write-output "::set-output name=action_echo::disabled"
|
||||
write-output "::echo::on"
|
||||
write-output "::set-output name=action_echo::enabled"
|
||||
write-output "::echo::off"
|
||||
write-output "::set-output name=action_echo::disabled"
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
The example above prints the following lines to the log:
|
||||
|
||||
```{:copy}
|
||||
::set-output name=action_echo::enabled
|
||||
::echo::off
|
||||
```
|
||||
@@ -298,13 +503,13 @@ Only the second `set-output` and `echo` workflow commands are included in the lo
|
||||
|
||||
以下の例はJavaScriptを使って`save-state`コマンドを実行します。 結果の環境変数は`STATE_processID`という名前になり、`12345`という値を持ちます。
|
||||
|
||||
``` javascript
|
||||
```javascript{:copy}
|
||||
console.log('::save-state name=processID::12345')
|
||||
```
|
||||
|
||||
そして、`STATE_processID`変数は`main`アクションの下で実行されるクリーンアップスクリプトからのみ利用できます。 以下の例は`main`を実行し、JavaScriptを使って環境変数`STATE_processID`に割り当てられた値を表示します。
|
||||
|
||||
``` javascript
|
||||
```javascript{:copy}
|
||||
console.log("The running PID from the main action is: " + process.env.STATE_processID);
|
||||
```
|
||||
|
||||
@@ -312,37 +517,70 @@ console.log("The running PID from the main action is: " + process.env.STATE_pro
|
||||
|
||||
ワークフローの実行中に、ランナーは特定のアクションを実行する際に使用できる一時ファイルを生成します。 これらのファイルへのパスは、環境変数を介して公開されます。 コマンドを適切に処理するには、これらのファイルに書き込むときに UTF-8 エンコーディングを使用する必要があります。 複数のコマンドを、改行で区切って同じファイルに書き込むことができます。
|
||||
|
||||
{% warning %}
|
||||
{% powershell %}
|
||||
|
||||
**Warning:** On Windows, legacy PowerShell (`shell: powershell`) does not use UTF-8 by default.
|
||||
{% note %}
|
||||
|
||||
When using `shell: powershell`, you must specify UTF-8 encoding. 例:
|
||||
**Note:** PowerShell versions 5.1 and below (`shell: powershell`) do not use UTF-8 by default, so you must specify the UTF-8 encoding. 例:
|
||||
|
||||
```yaml
|
||||
```yaml{:copy}
|
||||
jobs:
|
||||
legacy-powershell-example:
|
||||
uses: windows-2019
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- shell: powershell
|
||||
run: echo "mypath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
run: |
|
||||
"mypath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||
```
|
||||
|
||||
Alternatively, you can use PowerShell Core (`shell: pwsh`), which defaults to UTF-8.
|
||||
PowerShell Core versions 6 and higher (`shell: pwsh`) use UTF-8 by default. 例:
|
||||
|
||||
{% endwarning %}
|
||||
```yaml{:copy}
|
||||
jobs:
|
||||
powershell-core-example:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- shell: pwsh
|
||||
run: |
|
||||
"mypath" >> $env:GITHUB_PATH
|
||||
```
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
## 環境変数の設定
|
||||
|
||||
``` bash
|
||||
{% bash %}
|
||||
|
||||
```bash{:copy}
|
||||
echo "{environment_variable_name}={value}" >> $GITHUB_ENV
|
||||
```
|
||||
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
- Using PowerShell version 6 and higher:
|
||||
```pwsh{:copy}
|
||||
"{environment_variable_name}={value}" >> $env:GITHUB_ENV
|
||||
```
|
||||
|
||||
- Using PowerShell version 5.1 and below:
|
||||
```powershell{:copy}
|
||||
"{environment_variable_name}={value}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
You can make an environment variable available to any subsequent steps in a workflow job by defining or updating the environment variable and writing this to the `GITHUB_ENV` environment file. The step that creates or updates the environment variable does not have access to the new value, but all subsequent steps in a job will have access. The names of environment variables are case-sensitive, and you can include punctuation. 詳しい情報については、「[環境変数](/actions/learn-github-actions/environment-variables)」を参照してください。
|
||||
|
||||
### サンプル
|
||||
|
||||
{% bash %}
|
||||
|
||||
{% raw %}
|
||||
```
|
||||
```yaml{:copy}
|
||||
steps:
|
||||
- name: Set the value
|
||||
id: step_one
|
||||
@@ -355,11 +593,31 @@ steps:
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
{% raw %}
|
||||
```yaml{:copy}
|
||||
steps:
|
||||
- name: Set the value
|
||||
id: step_one
|
||||
run: |
|
||||
"action_state=yellow" >> $env:GITHUB_ENV
|
||||
- name: Use the value
|
||||
id: step_two
|
||||
run: |
|
||||
Write-Output "${{ env.action_state }}" # This will output 'yellow'
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
### 複数行の文字列
|
||||
|
||||
複数行の文字列の場合、次の構文で区切り文字を使用できます。
|
||||
|
||||
```
|
||||
```{:copy}
|
||||
{name}<<{delimiter}
|
||||
{value}
|
||||
{delimiter}
|
||||
@@ -367,29 +625,75 @@ steps:
|
||||
|
||||
#### サンプル
|
||||
|
||||
この例では、区切り文字として `EOF` を使用し、`JSON_RESPONSE` 環境変数を cURL レスポンスの値に設定します。
|
||||
```yaml
|
||||
This example uses `EOF` as a delimiter, and sets the `JSON_RESPONSE` environment variable to the value of the `curl` response.
|
||||
|
||||
{% bash %}
|
||||
|
||||
```yaml{:copy}
|
||||
steps:
|
||||
- name: Set the value
|
||||
- name: Set the value in bash
|
||||
id: step_one
|
||||
run: |
|
||||
echo 'JSON_RESPONSE<<EOF' >> $GITHUB_ENV
|
||||
curl https://httpbin.org/json >> $GITHUB_ENV
|
||||
curl https://example.lab >> $GITHUB_ENV
|
||||
echo 'EOF' >> $GITHUB_ENV
|
||||
```
|
||||
|
||||
## システムパスの追加
|
||||
{% endbash %}
|
||||
|
||||
``` bash
|
||||
echo "{path}" >> $GITHUB_PATH
|
||||
{% powershell %}
|
||||
|
||||
```yaml{:copy}
|
||||
steps:
|
||||
- name: Set the value in pwsh
|
||||
id: step_one
|
||||
run: |
|
||||
"JSON_RESPONSE<<EOF" >> $env:GITHUB_ENV
|
||||
(Invoke-WebRequest -Uri "https://example.lab").Content >> $env:GITHUB_ENV
|
||||
"EOF" >> $env:GITHUB_ENV
|
||||
shell: pwsh
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
## システムパスの追加
|
||||
|
||||
Prepends a directory to the system `PATH` variable and automatically makes it available to all subsequent actions in the current job; the currently running action cannot access the updated path variable. ジョブに現在定義されているパスを見るには、ステップもしくはアクション中で`echo "$PATH"`を使うことができます。
|
||||
|
||||
{% bash %}
|
||||
|
||||
```bash{:copy}
|
||||
echo "{path}" >> $GITHUB_PATH
|
||||
```
|
||||
{% endbash %}
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```pwsh{:copy}
|
||||
"{path}" >> $env:GITHUB_PATH
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
### サンプル
|
||||
|
||||
この例は、ユーザの`$HOME/.local/bin`ディレクトリを`PATH`に追加する方法を示しています。
|
||||
|
||||
``` bash
|
||||
{% bash %}
|
||||
|
||||
```bash{:copy}
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
```
|
||||
|
||||
{% endbash %}
|
||||
|
||||
|
||||
This example demonstrates how to add the user `$env:HOMEPATH/.local/bin` directory to `PATH`:
|
||||
|
||||
{% powershell %}
|
||||
|
||||
```pwsh{:copy}
|
||||
"$env:HOMEPATH/.local/bin" >> $env:GITHUB_PATH
|
||||
```
|
||||
|
||||
{% endpowershell %}
|
||||
|
||||
@@ -17,7 +17,11 @@ topics:
|
||||
|
||||
ハードコードされたIPアドレスの代わりにホスト名を設定すれば、ユーザやクライアントソフトウェアに影響を与えることなく{% data variables.product.product_location %}を動作させる物理ハードウェアを変更できるようになります。
|
||||
|
||||
{% data variables.enterprise.management_console %} のホスト名の設定は、適切な完全修飾ドメイン名 (FQDN) に設定して、インターネット上または内部ネットワーク内で解決できるようにしてください。 たとえば、ホスト名の設定は `github.companyname.com` であるかもしれません。 また、選択したホスト名に対して Subdomain Isolation を有効にして、いくつかのクロスサイトスクリプティングスタイルの脆弱性を軽減することもおすすめします。 ホスト名の設定に関する詳しい情報については、[HTTP RFC の Section 2.1](https://tools.ietf.org/html/rfc1123#section-2) を参照してください。
|
||||
{% data variables.enterprise.management_console %} のホスト名の設定は、適切な完全修飾ドメイン名 (FQDN) に設定して、インターネット上または内部ネットワーク内で解決できるようにしてください。 For example, your hostname setting could be `github.companyname.com.` Web and API requests will automatically redirect to the hostname configured in the {% data variables.enterprise.management_console %}.
|
||||
|
||||
After you configure a hostname, you can enable subdomain isolation to further increase the security of {% data variables.product.product_location %}. 詳しい情報については"[Subdomain Isolationの有効化](/enterprise/{{ currentVersion }}/admin/guides/installation/enabling-subdomain-isolation/)"を参照してください。
|
||||
|
||||
For more information on the supported hostname types, see [Section 2.1 of the HTTP RFC](https://tools.ietf.org/html/rfc1123#section-2).
|
||||
|
||||
{% data reusables.enterprise_installation.changing-hostname-not-supported %}
|
||||
|
||||
@@ -29,4 +33,4 @@ topics:
|
||||
{% data reusables.enterprise_management_console.test-domain-settings-failure %}
|
||||
{% data reusables.enterprise_management_console.save-settings %}
|
||||
|
||||
ホスト名を設定したら、{% data variables.product.product_location %}のSubdomain Isolationを有効化することをお勧めします。 詳しい情報については"[Subdomain Isolationの有効化](/enterprise/{{ currentVersion }}/admin/guides/installation/enabling-subdomain-isolation/)"を参照してください。
|
||||
To help mitigate various cross-site scripting vulnerabilities, we recommend that you enable subdomain isolation for {% data variables.product.product_location %} after you configure a hostname. 詳しい情報については"[Subdomain Isolationの有効化](/enterprise/{{ currentVersion }}/admin/guides/installation/enabling-subdomain-isolation/)"を参照してください。
|
||||
|
||||
@@ -19,25 +19,32 @@ shortTitle: Initiate failover to appliance
|
||||
|
||||
{% data reusables.enterprise_installation.promoting-a-replica %}
|
||||
|
||||
1. アプライアンスを切り替える前にレプリケーションを終了できるようにするには、プライマリアプライアンスをメンテナンスモードにします。
|
||||
- Management Console を使用するには、「[メンテナンスモードの有効化とスケジュール設定](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode/)」を参照してください。
|
||||
- `ghe-maintenance -s` コマンドも使用できます。
|
||||
1. If the primary appliance is available, to allow replication to finish before you switch appliances, on the primary appliance, put the primary appliance into maintenance mode.
|
||||
|
||||
- Put the appliance into maintenance mode.
|
||||
|
||||
- Management Console を使用するには、「[メンテナンスモードの有効化とスケジュール設定](/enterprise/admin/guides/installation/enabling-and-scheduling-maintenance-mode/)」を参照してください。
|
||||
|
||||
- `ghe-maintenance -s` コマンドも使用できます。
|
||||
```shell
|
||||
$ ghe-maintenance -s
|
||||
```
|
||||
|
||||
- When the number of active Git operations, MySQL queries, and Resque jobs reaches zero, wait 30 seconds.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Nomad will always have jobs running, even in maintenance mode, so you can safely ignore these jobs.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
- すべてのレプリケーションチャネルが `OK` を報告することを確認するには、`ghe-repl-status -vv` コマンドを使用します。
|
||||
|
||||
```shell
|
||||
$ ghe-maintenance -s
|
||||
$ ghe-repl-status -vv
|
||||
```
|
||||
2. When the number of active Git operations, MySQL queries, and Resque jobs reaches zero, wait 30 seconds.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Nomad will always have jobs running, even in maintenance mode, so you can safely ignore these jobs.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
3. すべてのレプリケーションチャネルが `OK` を報告することを確認するには、`ghe-repl-status -vv` コマンドを使用します。
|
||||
```shell
|
||||
$ ghe-repl-status -vv
|
||||
```
|
||||
4. レプリケーションを停止してレプリカアプライアンスをプライマリステータスに昇格するには、`ghe-repl-encourage` コマンドを使用します。 到達可能であれば、これによりプライマリノードも自動的にメンテナンスノードになります。
|
||||
4. On the replica appliance, to stop replication and promote the replica appliance to primary status, use the `ghe-repl-promote` command. 到達可能であれば、これによりプライマリノードも自動的にメンテナンスノードになります。
|
||||
```shell
|
||||
$ ghe-repl-promote
|
||||
```
|
||||
|
||||
@@ -25,7 +25,7 @@ topics:
|
||||
|
||||
移行においては、すべての事項についてリポジトリが中心になります。 リポジトリに関係するほとんどのデータは移行できます。 たとえば Organization 内のリポジトリは、リポジトリ*および*その Organization、またそのリポジトリに関連付けられているユーザ、Team、Issue、プルリクエストのすべてを移行します。
|
||||
|
||||
以下の表の項目はレポジトリと共に移行できます。 このデータの移行リストに記載されていない項目はどれも移行できません。
|
||||
以下の表の項目はレポジトリと共に移行できます。 Any items not shown in the list of migrated data can not be migrated, including {% data variables.large_files.product_name_short %} assets.
|
||||
|
||||
{% data reusables.enterprise_migrations.fork-persistence %}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ shortTitle: Check for existing SSH key
|
||||
# .ssh ディレクトリ内のファイルを一覧表示する(存在する場合)
|
||||
```
|
||||
|
||||
3. ディレクトリの一覧から、公開 SSH キーをすでに持っているか確認します。 By default, the {% ifversion ghae %}filename of a supported public key for {% data variables.product.product_name %} is *id_rsa.pub*.{% elsif fpt or ghes %}filenames of supported public keys for {% data variables.product.product_name %} are one of the following.
|
||||
3. ディレクトリの一覧から、公開 SSH キーをすでに持っているか確認します。 By default, the {% ifversion ghae %}filename of a supported public key for {% data variables.product.product_name %} is *id_rsa.pub*.{% else %}filenames of supported public keys for {% data variables.product.product_name %} are one of the following.
|
||||
- *id_rsa.pub*
|
||||
- *id_ecdsa.pub*
|
||||
- *id_ed25519.pub*{% endif %}
|
||||
|
||||
@@ -33,7 +33,7 @@ $ ssh -T -p 443 git@ssh.github.com
|
||||
|
||||
If you are able to SSH into `git@ssh.{% data variables.command_line.backticks %}` over port 443, you can override your SSH settings to force any connection to {% data variables.product.product_location %} to run through that server and port.
|
||||
|
||||
To set this in your SSH confifguration file, edit the file at `~/.ssh/config`, and add this section:
|
||||
To set this in your SSH configuration file, edit the file at `~/.ssh/config`, and add this section:
|
||||
|
||||
```
|
||||
Host {% data variables.command_line.codeblock %}
|
||||
|
||||
@@ -31,9 +31,9 @@ If your project communicates with an external service, you might use a token or
|
||||
{% ifversion fpt or ghec %}
|
||||
{% data variables.product.prodname_secret_scanning_caps %} is available on {% data variables.product.prodname_dotcom_the_website %} in two forms:
|
||||
|
||||
1. **{% data variables.product.prodname_secret_scanning_partner_caps %}.** Runs automatically on all public repositories. Any strings that match patterns that were provided by secret scanning partners are reported directly to the relvant partner.
|
||||
1. **{% data variables.product.prodname_secret_scanning_partner_caps %}.** Runs automatically on all public repositories. Any strings that match patterns that were provided by secret scanning partners are reported directly to the relevant partner.
|
||||
|
||||
2. **{% data variables.product.prodname_secret_scanning_GHAS_caps %}.** You can enable and configure additional scanning for repositories owned by organizations that use {% data variables.product.prodname_ghe_cloud %} and have a license for {% data variables.product.prodname_GH_advanced_security %}. Any strings that match patterns provided by secret scannng partners, by other service providers, or defined by your organization are reported as alerts in the "Security" tab of repositories. If a string in a public repository matches a partner pattern, it is also reported to the partner.
|
||||
2. **{% data variables.product.prodname_secret_scanning_GHAS_caps %}.** You can enable and configure additional scanning for repositories owned by organizations that use {% data variables.product.prodname_ghe_cloud %} and have a license for {% data variables.product.prodname_GH_advanced_security %}. Any strings that match patterns provided by secret scanning partners, by other service providers, or defined by your organization, are reported as alerts in the "Security" tab of repositories. If a string in a public repository matches a partner pattern, it is also reported to the partner.
|
||||
{% endif %}
|
||||
|
||||
Service providers can partner with {% data variables.product.company_short %} to provide their secret formats for scanning. {% data reusables.secret-scanning.partner-program-link %}
|
||||
|
||||
@@ -22,7 +22,7 @@ topics:
|
||||
|
||||
## フォークについて
|
||||
|
||||
一般的にフォークは、他のユーザのプロジェクトへの変更を提案するため、あるいは他のユーザのプロジェクトを自分のアイディアの出発点として活用するために使用します。 You can fork a repository to create a copy of the repository and make changes without affecting the upstream repository. For more information, see "[Working with forks](/github/collaborating-with-issues-and-pull-requests/working-with-forks)."
|
||||
Most commonly, forks are used to either propose changes to someone else's project to which you don't have write access, or to use someone else's project as a starting point for your own idea. You can fork a repository to create a copy of the repository and make changes without affecting the upstream repository. For more information, see "[Working with forks](/github/collaborating-with-issues-and-pull-requests/working-with-forks)."
|
||||
|
||||
### 他のユーザのプロジェクトへの変更を提案する
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ When you created a new branch in the previous step, {% data variables.product.pr
|
||||
You can make and save changes to the files in your repository. On {% data variables.product.product_name %}, saved changes are called commits. Each commit has an associated commit message, which is a description explaining why a particular change was made. Commit messages capture the history of your changes so that other contributors can understand what you’ve done and why.
|
||||
|
||||
1. Under the `readme-edits` branch you created, click the _README.md_ file.
|
||||
2. Click {% octicon "pencil" aria-label="The edit icon" %} to edit the file.
|
||||
2. {% octicon "pencil" aria-label="The edit icon" %}をクリックしてファイルを編集してください。
|
||||
3. In the editor, write a bit about yourself. Try using different Markdown elements.
|
||||
4. In the **Commit changes** box, write a commit message that describes your changes.
|
||||
5. **[Commit changes]** をクリックしてください。
|
||||
|
||||
@@ -31,12 +31,12 @@ shortTitle: カスタムドメインのトラブルシューティング
|
||||
|
||||
## DNS の設定ミス
|
||||
|
||||
デフォルトドメインをカスタムドメインにポイントすることに問題がある場合は、DNS プロバイダに連絡してください。
|
||||
サイトのデフォルトドメインをカスタムドメインを指すようにすることに問題がある場合は、DNS プロバイダに連絡してください。
|
||||
|
||||
You can also use one of the following methods to test whether your custom domain's DNS records are configured correctly:
|
||||
カスタムドメインのDNSレコードが正しく設定されているかをテストするには、以下の方法のいずれかを使うこともできます。
|
||||
|
||||
- A CLI tool such as `dig`. For more information, see "[Managing a custom domain for your {% data variables.product.prodname_pages %} site](/articles/managing-a-custom-domain-for-your-github-pages-site)".
|
||||
- An online DNS lookup tool.
|
||||
- `dig`のようなCLIツール。 詳しい情報については「[{% data variables.product.prodname_pages %}サイトのカスタムドメインの管理](/articles/managing-a-custom-domain-for-your-github-pages-site)」を参照してください。
|
||||
- オンラインのDNSルックアップツール。
|
||||
|
||||
## サポートされていないカスタムドメイン名
|
||||
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
---
|
||||
title: Verifying your custom domain for GitHub Pages
|
||||
intro: You can increase the security of your custom domain and avoid takeover attacks by verifying your domain.
|
||||
title: GitHub Pagesのカスタムドメインの検証
|
||||
intro: ドメインを検証することで、カスタムドメインのセキュリティを高め、乗っ取り攻撃を回避できます。
|
||||
product: '{% data reusables.gated-features.pages %}'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pages
|
||||
shortTitle: Verify a custom domain
|
||||
shortTitle: カスタムドメインの検証
|
||||
---
|
||||
|
||||
## About domain verification for GitHub Pages
|
||||
## GitHub Pagesのドメイン検証について
|
||||
|
||||
When you verify your custom domain for your user account or organization, only repositories owned by your user account or organization may be used to publish a {% data variables.product.prodname_pages %} site to the verified custom domain or the domain's immediate subdomains.
|
||||
自分のユーザアカウントあるいはOrganizationのカスタムドメインを検証すると、その検証されたカスタムドメインもしくはその直接のサブドメインに{% data variables.product.prodname_pages %}サイトを公開できるのは、自分のユーザアカウントあるいはOrganizationが所有するリポジトリだけになります。
|
||||
|
||||
Verifying your domain stops other GitHub users from taking over your custom domain and using it to publish their own {% data variables.product.prodname_pages %} site. Domain takeovers can happen when you delete your repository, when your billing plan is downgraded, or after any other change which unlinks the custom domain or disables {% data variables.product.prodname_pages %} while the domain remains configured for {% data variables.product.prodname_pages %} and is not verified.
|
||||
ドメインを検証すると、他のGitHubユーザがそのカスタムドメインを乗っ取り、そのユーザ自身の{% data variables.product.prodname_pages %}サイトの公開に使うことを止められます。 ドメインの乗っ取りは、{% data variables.product.prodname_pages %}用にドメインを残したままで検証せず、あなたが自分のリポジトリを削除したとき、支払いプランをダウングレードしたとき、あるいはカスタムドメインのリンクを解除するその他の変更や{% data variables.product.prodname_pages %}を無効化した後に生じます。
|
||||
|
||||
When you verify a domain, any immediate subdomains are also included in the verification. For example, if the `github.com` custom domain is verified, `docs.github.com`, `support.github.com`, and any other immediate subdomains will also be protected from takeovers.
|
||||
ドメインを検証すると、直接のサブドメインもその検証に含まれます。 たとえば、`github.com`というカスタムドメインが検証されると、`docs.github.com`、`support.github.com`あるいはその他の直接のサブドメインも、乗っ取りから保護されることになります。
|
||||
|
||||
It's also possible to verify a domain for your organization{% ifversion ghec %} or enterprise{% endif %}, which displays a "Verified" badge on the organization {% ifversion ghec %}or enterprise{% endif %} profile{% ifversion ghec %} and, on {% data variables.product.prodname_ghe_cloud %}, allows you to restrict notifications to email addresses using the verified domain{% endif %}. For more information, see "[Verifying or approving a domain for your organization](/organizations/managing-organization-settings/verifying-or-approving-a-domain-for-your-organization){% ifversion ghec %}" and "[Verifying or approving a domain for your enterprise](/enterprise-cloud@latest/admin/configuration/configuring-your-enterprise/verifying-or-approving-a-domain-for-your-enterprise){% endif %}."
|
||||
Organization{% ifversion ghec %}あるいはEnterprise{% endif %}のドメインを検証することもできます。そうすると、「検証済み」バッジがOrganization{% ifversion ghec %}もしくはEnterprise{% endif %}のプロフィールに表示され{% ifversion ghec %}、{% data variables.product.prodname_ghe_cloud %}では検証済みドメインを使ってメールアドレスへの通知を制限できるようになり{% endif %}ます。 詳しい情報については「[Organizationのドメインの検証あるいは承認](/organizations/managing-organization-settings/verifying-or-approving-a-domain-for-your-organization)」{% ifversion ghec %}及び「[Enterpriseのドメインの検証あるいは承認](/enterprise-cloud@latest/admin/configuration/configuring-your-enterprise/verifying-or-approving-a-domain-for-your-enterprise)」{% endif %}を参照してください。
|
||||
|
||||
## Verifying a domain for your user site
|
||||
## ユーザサイトのドメインの検証
|
||||
|
||||
{% data reusables.user-settings.access_settings %}
|
||||
1. In the "Code, planning, and automation" section of the sidebar, click **{% octicon "browser" aria-label="The pages icon" %} Pages**.
|
||||
1. サイドバーの"Code, planning, and automation(コード、計画、自動化)"のセクションで、**{% octicon "browser" aria-label="The pages icon" %} Pages**をクリックしてください。
|
||||
{% data reusables.pages.settings-verify-domain-setup %}
|
||||
1. Wait for your DNS configuration to change, this may be immediate or take up to 24 hours. You can confirm the change to your DNS configuration by running the `dig` command on the command line. In the command below, replace `USERNAME` with your username and `example.com` with the domain you're verifying. If your DNS configuration has updated, you should see your new TXT record in the output.
|
||||
1. DNS設定が変更されるまで待ちます。これはすぐに行われることも、最大で24時間かかることもあります。 DNS設定への変更は、コマンドラインで`dig`コマンドを実行して確認できます。 以下のコマンドで、`USERNAME`を自分のユーザ名に、`example.com`を検証しているドメインに置き換えてください。 DNS設定が更新されていれば、出力中に新しいTXTレコードが表示されます。
|
||||
```
|
||||
dig _github-pages-challenge-USERNAME.example.com +nostats +nocomments +nocmd TXT
|
||||
```
|
||||
{% data reusables.pages.settings-verify-domain-confirm %}
|
||||
|
||||
## Verifying a domain for your organization site
|
||||
## Organizationのサイトのドメインの検証
|
||||
|
||||
Organization owners can verify custom domains for their organization.
|
||||
Organizationのオーナーは、自分のOrganizatinのカスタムドメインを検証できます。
|
||||
|
||||
{% data reusables.profile.access_org %}
|
||||
{% data reusables.profile.org_settings %}
|
||||
1. In the "Code, planning, and automation" section of the sidebar, click **{% octicon "browser" aria-label="The browser icon" %} Pages**.
|
||||
1. サイドバーの"Code, planning, and automation(コード、計画、自動化)"のセクションで、**{% octicon "browser" aria-label="The browser icon" %} Pages**をクリックしてください。
|
||||
{% data reusables.pages.settings-verify-domain-setup %}
|
||||
1. Wait for your DNS configuration to change, this may be immediate or take up to 24 hours. You can confirm the change to your DNS configuration by running the `dig` command on the command line. In the command below, replace `ORGANIZATION` with the name of your organization and `example.com` with the domain you're verifying. If your DNS configuration has updated, you should see your new TXT record in the output.
|
||||
1. DNS設定が変更されるまで待ちます。これはすぐに行われることも、最大で24時間かかることもあります。 DNS設定への変更は、コマンドラインで`dig`コマンドを実行して確認できます。 以下のコマンドで、`ORGANIZATION`を自分のOrganization名に、`example.com`を検証しているドメインに置き換えてください。 DNS設定が更新されていれば、出力中に新しいTXTレコードが表示されます。
|
||||
```
|
||||
dig _github-pages-challenge-ORGANIZATION.example.com +nostats +nocomments +nocmd TXT
|
||||
```
|
||||
|
||||
@@ -39,7 +39,7 @@ Jekyll テーマをリポジトリに手動で追加したことがある場合
|
||||
4. ページ上部の、選択したいテーマをクリックし、[**Select theme**] をクリックします。 ![テーマのオプションおよび [Select theme] ボタン](/assets/images/help/pages/select-theme.png)
|
||||
5. サイトの *README.md* ファイルを編集するようプロンプトが表示される場合があります。
|
||||
- ファイルを後で編集する場合、[**Cancel**] をクリックします。 ![ファイルを編集する際の [Cancel] リンク](/assets/images/help/pages/cancel-edit.png)
|
||||
- To edit the file now, see "[Editing files](/repositories/working-with-files/managing-files/editing-files)."
|
||||
- すぐにファイルを編集するには、「[Editing files(ファイルの編集)](/repositories/working-with-files/managing-files/editing-files)」を参照してください。
|
||||
|
||||
選択したテーマは、リポジトリの Markdown ファイルに自動的に適用されます。 テーマをリポジトリの HTML ファイルに適用するには、各ファイルのレイアウトを指定する YAML front matter を追加する必要があります。 詳しい情報については、Jekyll サイトの「[Front Matter](https://jekyllrb.com/docs/front-matter/)」を参照してください。
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: GitHub Pages サイトの公開元を設定する
|
||||
intro: '{% data variables.product.prodname_pages %} サイトでデフォルトの公開元を使用している場合、サイトは自動的に公開されます。 You can also choose to publish your site from a different branch or folder.'
|
||||
title: Configuring a publishing source for your GitHub Pages site
|
||||
intro: 'If you use the default publishing source for your {% data variables.product.prodname_pages %} site, your site will publish automatically. You can also choose to publish your site from a different branch or folder.'
|
||||
redirect_from:
|
||||
- /articles/configuring-a-publishing-source-for-github-pages
|
||||
- /articles/configuring-a-publishing-source-for-your-github-pages-site
|
||||
@@ -14,33 +14,36 @@ versions:
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pages
|
||||
shortTitle: 公開ソースの設定
|
||||
shortTitle: Configure publishing source
|
||||
---
|
||||
|
||||
公開元に関する詳しい情報については、「[{% data variables.product.prodname_pages %} について](/articles/about-github-pages#publishing-sources-for-github-pages-sites)」を参照してください。
|
||||
For more information about publishing sources, see "[About {% data variables.product.prodname_pages %}](/articles/about-github-pages#publishing-sources-for-github-pages-sites)."
|
||||
|
||||
## 公開元を選択する
|
||||
## Choosing a publishing source
|
||||
|
||||
Before you configure a publishing source, make sure the branch you want to use as your publishing source already exists in your repository.
|
||||
|
||||
{% data reusables.pages.navigate-site-repo %}
|
||||
{% data reusables.repositories.sidebar-settings %}
|
||||
{% data reusables.pages.sidebar-pages %}
|
||||
3. [{% data variables.product.prodname_pages %}] で、[**None**] または [**Branch**] ドロップダウンメニューから公開元を選択します。 
|
||||
4. 必要に応じて、ドロップダウンメニューで発行元のフォルダを選択します。 
|
||||
5. [**Save**] をクリックします。 
|
||||
3. Under "{% data variables.product.prodname_pages %}", use the **None** or **Branch** drop-down menu and select a publishing source.
|
||||

|
||||
4. Optionally, use the drop-down menu to select a folder for your publishing source.
|
||||

|
||||
5. Click **Save**.
|
||||

|
||||
|
||||
## {% data variables.product.prodname_pages %} サイトの公開に関するトラブルシューティング
|
||||
## Troubleshooting publishing problems with your {% data variables.product.prodname_pages %} site
|
||||
|
||||
{% data reusables.pages.admin-must-push %}
|
||||
|
||||
If you choose the `docs` folder on any branch as your publishing source, then later remove the `/docs` folder from that branch in your repository, your site won't build and you'll get a page build error message for a missing `/docs` folder. 詳細については、「[{% data variables.product.prodname_pages %} サイトの Jekyll ビルドエラーに関するトラブルシューティング](/articles/troubleshooting-jekyll-build-errors-for-github-pages-sites#missing-docs-folder)」を参照してください。
|
||||
If you choose the `docs` folder on any branch as your publishing source, then later remove the `/docs` folder from that branch in your repository, your site won't build and you'll get a page build error message for a missing `/docs` folder. For more information, see "[Troubleshooting Jekyll build errors for {% data variables.product.prodname_pages %} sites](/articles/troubleshooting-jekyll-build-errors-for-github-pages-sites#missing-docs-folder)."
|
||||
|
||||
{% ifversion fpt %}
|
||||
{% ifversion fpt %}
|
||||
|
||||
Your {% data variables.product.prodname_pages %} site will always be deployed with a {% data variables.product.prodname_actions %} workflow run, even if you've configured your {% data variables.product.prodname_pages %} site to be built using a different CI tool. Most external CI workflows "deploy" to GitHub Pages by committing the build output to the `gh-pages` branch of the repository, and typically include a `.nojekyll` file. When this happens, the {% data variables.product.prodname_actions %} worfklow will detect the state that the branch does not need a build step, and will execute only the steps necessary to deploy the site to {% data variables.product.prodname_pages %} servers.
|
||||
|
||||
To find potential errors with either the build or deployment, you can check the workflow run for your {% data variables.product.prodname_pages %} site by reviewing your repository's workflow runs. 詳しい情報については、「[ワークフロー実行の履歴を表示する](/actions/monitoring-and-troubleshooting-workflows/viewing-workflow-run-history)」を参照してください。 For more information about how to re-run the workflow in case of an error, see "[Re-running workflows and jobs](/actions/managing-workflow-runs/re-running-workflows-and-jobs)."
|
||||
To find potential errors with either the build or deployment, you can check the workflow run for your {% data variables.product.prodname_pages %} site by reviewing your repository's workflow runs. For more information, see "[Viewing workflow run history](/actions/monitoring-and-troubleshooting-workflows/viewing-workflow-run-history)." For more information about how to re-run the workflow in case of an error, see "[Re-running workflows and jobs](/actions/managing-workflow-runs/re-running-workflows-and-jobs)."
|
||||
|
||||
{% note %}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ shortTitle: GitHub Pagesのサイトの作成
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip:** If `index.html` is present, this will be used instead of `index.md`. If neither `index.html` nor `index.md` are present, `README.md` will be used.
|
||||
**参考:** `index.html`があるなら、`index.md`の代わりに利用されます。 `index.html`も`index.md`もないなら、`README.md`が使われます。
|
||||
|
||||
{% endtip %}
|
||||
{% data reusables.pages.configure-publishing-source %}
|
||||
|
||||
@@ -25,7 +25,7 @@ shortTitle: HTTPSでのサイトの保護
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** RFC3280 states that the maximum length of the common name should be 64 characters. Therefore, the entire domain name of your {% data variables.product.prodname_pages %} site must be less than 64 characters long for a certificate to be successfully created.
|
||||
**ノート:** RFC3280は、コモンネームの最大長は64文字でなければならないとしています。 したがって、証明書が正常に作成されるようにするには、{% data variables.product.prodname_pages %}サイトのドメイン名全体の長さは64文字未満でなければなりません。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
@@ -36,11 +36,11 @@ shortTitle: HTTPSでのサイトの保護
|
||||
{% data reusables.pages.sidebar-pages %}
|
||||
3. [{% data variables.product.prodname_pages %}] で、[**Enforce HTTPS**] を選択します。 ![[Enforce HTTPS] チェックボックス](/assets/images/help/pages/enforce-https-checkbox.png)
|
||||
|
||||
## Troubleshooting certificate provisioning ("Certificate not yet created" error")
|
||||
## 証明書プロビジョニングのトラブルシューティング("Certificate not yet created" error")
|
||||
|
||||
When you set or change your custom domain in the Pages settings, an automatic DNS check begins. This check determines if your DNS settings are configured to allow {% data variables.product.prodname_dotcom %} to obtain a certificate automatically. If the check is successful, {% data variables.product.prodname_dotcom %} queues a job to request a TLS certificate from [Let's Encrypt](https://letsencrypt.org/). On receiving a valid certificate, {% data variables.product.prodname_dotcom %} automatically uploads it to the servers that handle TLS termination for Pages. When this process completes successfully, a check mark is displayed beside your custom domain name.
|
||||
Pagesの設定でカスタムドメインを設定もしくは変更した場合、自動DNSチェックが開始されます。 このチェックは、DNS設定が{% data variables.product.prodname_dotcom %}による自動的な証明書の取得を許可するように設定されているかを判断します。 このチェックに成功すると、{% data variables.product.prodname_dotcom %}は[Let's Encrypt](https://letsencrypt.org/)にTLS証明書をリクエストするジョブをキューイングします。 有効な証明書を受信すると、{% data variables.product.prodname_dotcom %}は自動的にそれをPagesのTLSターミネーションを処理するサーバーにアップロードします。 このプロセスが正常に終了すると、カスタムドメイン名の横にチェックマークが表示されます。
|
||||
|
||||
The process may take some time. If the process has not completed several minutes after you clicked **Save**, try clicking **Remove** next to your custom domain name. Retype the domain name and click **Save** again. This will cancel and restart the provisioning process.
|
||||
このプロセスには多少の時間がかかることがあります。 **Save(保存)**をクリックしてから数分経ってもこのプロセスが終了しないなら、カスタムドメイン名の隣にある**Remove(削除)**をクリックしてみてください。 ドメイン名を再入力し、**Save(保存)**をもう一度クリックしてください。 これでプロビジョニングのプロセスがキャンセルされ、再起動されます。
|
||||
|
||||
## 混在したコンテンツの問題を解決する
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: GitHub Pagesのドキュメンテーション
|
||||
shortTitle: GitHub Pages
|
||||
intro: 'You can create a website directly from a repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}.'
|
||||
intro: '{% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}上のリポジトリから直接Webサイトを作成できます。'
|
||||
redirect_from:
|
||||
- /categories/20/articles
|
||||
- /categories/95/articles
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Quickstart for GitHub Pages
|
||||
intro: 'You can use {% data variables.product.prodname_pages %} to showcase some open source projects, host a blog, or even share your résumé. This guide will help get you started on creating your next website.'
|
||||
title: GitHub Pagesのクイックスタート
|
||||
intro: '{% data variables.product.prodname_pages %}を使って、オープンソースプロジェクトを紹介したり、ブログをホストしたり、履歴書を共有することさえもできます。 このガイドは、次のWebサイトを作成し始めるための役に立ちます。'
|
||||
allowTitleToDifferFromFilename: true
|
||||
versions:
|
||||
fpt: '*'
|
||||
@@ -16,30 +16,30 @@ product: '{% data reusables.gated-features.pages %}'
|
||||
|
||||
## はじめに
|
||||
|
||||
{% data variables.product.prodname_pages %} are public webpages hosted and published through {% data variables.product.product_name %}. The quickest way to get up and running is by using the Jekyll Theme Chooser to load a pre-made theme. You can then modify your {% data variables.product.prodname_pages %}' content and style.
|
||||
{% data variables.product.prodname_pages %}は、{% data variables.product.product_name %}を通じてホストされ、公開されるパブリックなWebページです。 立ち上げて実行するための最速の方法は、Jekyll テーマ選択画面を使って事前作成されたテーマをロードすることです。 その後、{% data variables.product.prodname_pages %}のコンテンツやスタイルを変更できます。
|
||||
|
||||
This guide will lead you through creating a user site at `username.github.io`.
|
||||
このガイドは、`username.github.io`でのユーザサイトの作成をご案内します。
|
||||
|
||||
## Creating your website
|
||||
## Webサイトの作成
|
||||
|
||||
{% data reusables.repositories.create_new %}
|
||||
1. Enter `username.github.io` as the repository name. Replace `username` with your {% data variables.product.prodname_dotcom %} username. For example, if your username is `octocat`, the repository name should be `octocat.github.io`. 
|
||||
1. リポジトリ名として`username.github.io`を入力してください。 `username`を自分の{% data variables.product.prodname_dotcom %}ユーザ名で置き換えてください。 たとえば、ユーザ名が`octocat`なら、リポジトリ名は`octocat.github.io`となります。 
|
||||
{% data reusables.repositories.sidebar-settings %}
|
||||
{% data reusables.pages.sidebar-pages %}
|
||||
1. Click **Choose a theme**. ![[Choose a theme] ボタン](/assets/images/help/pages/choose-theme.png)
|
||||
2. The Theme Chooser will open. Browse the available themes, then click **Select theme** to select a theme. It's easy to change your theme later, so if you're not sure, just choose one for now. ![テーマのオプションおよび [Select theme] ボタン](/assets/images/help/pages/select-theme.png)
|
||||
3. After you select a theme, your repository's `README.md` file will open in the file editor. The `README.md` file is where you will write the content for your site. You can edit the file or keep the default content for now.
|
||||
4. When you are done editing the file, click **Commit changes**.
|
||||
5. Visit `username.github.io` to view your new website. **メモ:** サイトに対する変更は、その変更を{% data variables.product.product_name %}にプッシュしてから公開されるまでに、最大20分かかることがあります。
|
||||
1. **Choose a theme(テーマの選択)**をクリックしてください。 ![[Choose a theme] ボタン](/assets/images/help/pages/choose-theme.png)
|
||||
2. テーマ選択画面が開きます。 利用可能なテーマをブラウズし、**Select theme(テーマの選択)**をクリックしてテーマを選択してください。 後でテーマを変更することも容易なので、はっきりしない場合はとりあえずどれか1つを選択しておいてください。 ![テーマのオプションおよび [Select theme] ボタン](/assets/images/help/pages/select-theme.png)
|
||||
3. テーマとを選択すると、ファイルエディタで`README.md`ファイルが開かれます。 `README.md`ファイルは、サイトの内容を書くところです。 このファイルを編集することも、あるいはとりあえずデフォルトの内容をそのままにしておくこともできます。
|
||||
4. ファイルの編集が終わったら、**Commit changes(変更をコミット)**をクリックしてください。
|
||||
5. `username.github.io`にアクセスして、新しいWebサイトを見てみてください。 **メモ:** サイトに対する変更は、その変更を{% data variables.product.product_name %}にプッシュしてから公開されるまでに、最大20分かかることがあります。
|
||||
|
||||
## Changing the title and description
|
||||
## タイトルと説明の変更
|
||||
|
||||
By default, the title of your site is `username.github.io`. You can change the title by editing the `_config.yml` file in your repository. You can also add a description for your site.
|
||||
デフォルトでは、サイトのタイトルは`username.github.io`です。 リポジトリ内の`_config.yml`ファイルを編集すれば、タイトルを変更できます。 サイトの説明を追加することもできます。
|
||||
|
||||
1. Click the **Code** tab of your repository.
|
||||
1. In the file list, click `_config.yml` to open the file.
|
||||
1. Click {% octicon "pencil" aria-label="The edit icon" %} to edit the file.
|
||||
1. The `_config.yml` file already contains a line that specifies the theme for your site. Add a new line with `title:` followed by the title you want. Add a new line with `description:` followed by the description you want. 例:
|
||||
1. リポジトリの**Code(コード)**タブをクリックしてください。
|
||||
1. ファイルリスト中で`_config.yml`をクリックしてオープンしてください。
|
||||
1. {% octicon "pencil" aria-label="The edit icon" %}をクリックしてファイルを編集してください。
|
||||
1. `_config.yml`には、既にサイトのテーマを指定する行が含まれています。 新しい行として`title:`の後に指定したいタイトルを続けてください。 新しい行を追加して`description:`の後に指定したい説明を続けてください。 例:
|
||||
|
||||
```yaml
|
||||
theme: jekyll-theme-minimal
|
||||
@@ -47,10 +47,10 @@ By default, the title of your site is `username.github.io`. You can change the t
|
||||
description: Bookmark this to keep an eye on my project updates!
|
||||
```
|
||||
|
||||
1. When you are done editing the file, click **Commit changes**.
|
||||
1. ファイルの編集を終えたら、**Commit changes(変更をコミット)**をクリックしてください。
|
||||
|
||||
## 次のステップ
|
||||
|
||||
For more information about how to add additional pages to your site, see "[Adding content to your GitHub Pages site using Jekyll](/pages/setting-up-a-github-pages-site-with-jekyll/adding-content-to-your-github-pages-site-using-jekyll#about-content-in-jekyll-sites)."
|
||||
サイトへのページの追加方法に関する詳しい情報については「[Jekyllを使ったGitHub Pagesサイトへのコンテンツの追加](/pages/setting-up-a-github-pages-site-with-jekyll/adding-content-to-your-github-pages-site-using-jekyll#about-content-in-jekyll-sites)」を参照してください。
|
||||
|
||||
For more information about setting up a {% data variables.product.prodname_pages %} site with Jekyll, see "[About GitHub Pages and Jekyll](/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll)."
|
||||
Jekyllと合わせて{% data variables.product.prodname_pages %}をセットアップすることに関する詳しい情報については「[GitHub PagesとJekyllについて](/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll)」を参照してください。
|
||||
|
||||
@@ -68,9 +68,9 @@ Jekyll を使用して {% data variables.product.prodname_pages %} サイトを
|
||||
サイトを `gh-pages` ブランチから公開する場合には、`gh-pages` ブランチを作成してチェックアウトします。
|
||||
```shell
|
||||
$ git checkout --orphan gh-pages
|
||||
# Creates a new branch, with no history or contents, called gh-pages, and switches to the gh-pages branch
|
||||
# 履歴やコンテンツなしでgh-pagesという新しいブランチを作成、gh-pagesブランチに切り替え
|
||||
$ git rm -rf
|
||||
# Removes the contents from your default branch from the working directory
|
||||
# ワーキングディレクトリでデフォルトブランチからコンテンツを削除
|
||||
```
|
||||
1. 新しい Jekyll サイトを作成するには、`jekyll new` コマンドを使用します。
|
||||
```shell
|
||||
@@ -89,7 +89,7 @@ Jekyll を使用して {% data variables.product.prodname_pages %} サイトを
|
||||
|
||||
正しいバージョンの Jekyll は、`github-pages` gem の依存関係としてインストールされます。
|
||||
1. Gemfile を保存して閉じます。
|
||||
1. From the command line, run `bundle install`.
|
||||
1. コマンドラインから`bundle install`を実行
|
||||
1. あるいは、`_config.yml`ファイルに必要な編集を加えてください。 これは、リポジトリがサブディレクトリでホストされている場合に相対パスに対して必要です。 詳しい情報については「[サブフォルダを分割して新しいリポジトリにする](/github/getting-started-with-github/using-git/splitting-a-subfolder-out-into-a-new-repository)」を参照してください。
|
||||
```yml
|
||||
domain: my-site.github.io # HTTPSを強制したいなら、ドメインの先頭でhttpを指定しない。例: example.com
|
||||
@@ -102,7 +102,7 @@ Jekyll を使用して {% data variables.product.prodname_pages %} サイトを
|
||||
git add .
|
||||
git commit -m 'Initial GitHub pages site with Jekyll'
|
||||
```
|
||||
1. Add your repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %} as a remote, replacing {% ifversion ghes or ghae %}_HOSTNAME_ with your enterprise's hostname,{% endif %} _USER_ with the account that owns the repository{% ifversion ghes or ghae %},{% endif %} and _REPOSITORY_ with the name of the repository.
|
||||
1. {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}でリモートとしてリポジトリを追加してください。{% ifversion ghes or ghae %}_HOSTNAME_をEnterpriseのホスト名で、{% endif %}_USER_をリポジトリを所有するアカウントで、{% ifversion ghes or ghae %}{% endif %}_REPOSITORY_をリポジトリ名で置き換えてください。
|
||||
```shell
|
||||
{% ifversion fpt or ghec %}
|
||||
$ git remote add origin https://github.com/<em>USER</em>/<em>REPOSITORY</em>.git
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Jekyll を使用して、GitHub Pages サイトの Markdown プロセッサを設定する
|
||||
intro: 'Markdown プロセッサを選択して、{% data variables.product.prodname_pages %} サイトで Markdown をどのようにレンダリングするかを決めることができます。'
|
||||
title: Setting a Markdown processor for your GitHub Pages site using Jekyll
|
||||
intro: 'You can choose a Markdown processor to determine how Markdown is rendered on your {% data variables.product.prodname_pages %} site.'
|
||||
redirect_from:
|
||||
- /articles/migrating-your-pages-site-from-maruku
|
||||
- /articles/updating-your-markdown-processor-to-kramdown
|
||||
@@ -14,25 +14,26 @@ versions:
|
||||
ghec: '*'
|
||||
topics:
|
||||
- Pages
|
||||
shortTitle: Markdownプロセッサの設定
|
||||
shortTitle: Set Markdown processor
|
||||
---
|
||||
|
||||
リポジトリへの書き込み権限があるユーザは、{% data variables.product.prodname_pages %} サイトに対して Markdown プロセッサを設定できます。
|
||||
People with write permissions for a repository can set the Markdown processor for a {% data variables.product.prodname_pages %} site.
|
||||
|
||||
{% data variables.product.prodname_pages %} supports two Markdown processors: [kramdown](http://kramdown.gettalong.org/) and {% data variables.product.prodname_dotcom %}'s own Markdown processor, which is used to render [{% data variables.product.prodname_dotcom %} Flavored Markdown (GFM)](https://github.github.com/gfm/) throughout {% data variables.product.product_name %}. 詳しい情報については、「[{% data variables.product.prodname_dotcom %}での執筆とフォーマットについて](/articles/about-writing-and-formatting-on-github)」を参照してください。
|
||||
{% data variables.product.prodname_pages %} supports two Markdown processors: [kramdown](http://kramdown.gettalong.org/) and {% data variables.product.prodname_dotcom %}'s own Markdown processor, which is used to render [{% data variables.product.prodname_dotcom %} Flavored Markdown (GFM)](https://github.github.com/gfm/) throughout {% data variables.product.product_name %}. For more information, see "[About writing and formatting on {% data variables.product.prodname_dotcom %}](/articles/about-writing-and-formatting-on-github)."
|
||||
|
||||
You can use {% data variables.product.prodname_dotcom %} Flavored Markdown with either processor, but only our GFM processor will always match the results you see on {% data variables.product.product_name %}.
|
||||
|
||||
{% data reusables.pages.navigate-site-repo %}
|
||||
2. リポジトリの *_config.yml* ファイルを開きます。
|
||||
2. In your repository, browse to the *_config.yml* file.
|
||||
{% data reusables.repositories.edit-file %}
|
||||
4. `markdown` で始まる行を見つけ、値を `kramdown` または `GFM`に変更します。 
|
||||
4. Find the line that starts with `markdown:` and change the value to `kramdown` or `GFM`.
|
||||

|
||||
{% data reusables.files.write_commit_message %}
|
||||
{% data reusables.files.choose-commit-email %}
|
||||
{% data reusables.files.choose_commit_branch %}
|
||||
{% data reusables.files.propose_new_file %}
|
||||
|
||||
## 参考リンク
|
||||
## Further reading
|
||||
|
||||
- [kramdown のドキュメント](https://kramdown.gettalong.org/documentation.html)
|
||||
- [{% data variables.product.prodname_dotcom %} Flavored Markdown の仕様](https://github.github.com/gfm/)
|
||||
- [kramdown Documentation](https://kramdown.gettalong.org/documentation.html)
|
||||
- [{% data variables.product.prodname_dotcom %} Flavored Markdown Spec](https://github.github.com/gfm/)
|
||||
|
||||
@@ -52,7 +52,7 @@ Jekyll を使用してサイトをテストする前に、以下の操作が必
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If you are using Ruby 3.0 and Jekyll 4.2.x or older, you will need to add the `webrick` gem to your project's Gemfile prior to running `bundle install`.
|
||||
**ノート:** Ruby 3.0及びJekyll 4.2.xあるいはそれより古いものを使っているなら、`bundle install`を実行する前にプロジェクトのGemfileに`webrick` gemを追加する必要があります。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
|
||||
@@ -17,9 +17,11 @@ topics:
|
||||
shortTitle: Request a PR review
|
||||
---
|
||||
|
||||
ユーザアカウントが所有しているリポジトリのオーナーとコラボレータは、プルリクエストのレビューを割り当てることができます。 リポジトリに対するトリアージ権限を持つ Organization メンバーは、プルリクエストのレビューを割り当てることができます。
|
||||
Repositories belong to a personal account (a single individual owner) or an organization account (a shared account with numerous collaborators or maintainers). 詳しい情報については、「[{% data variables.product.prodname_dotcom %}アカウントの種類](/get-started/learning-about-github/types-of-github-accounts)」を参照してください。" Owners and collaborators on a repository owned by a personal account can assign pull request reviews. Organization members with triage permissions can also assign a reviewer for a pull request.
|
||||
|
||||
オーナーまたはコラボレータは、ユーザ所有のリポジトリに明示的に[読み取りアクセス](/articles/access-permissions-on-github)を付与された人にプルリクエストのレビューを割り当てることができます。 Organization メンバーは、リポジトリの読み取りアクセス権を持つ人や Team にプルリクエストのレビューを割り当てることができます。 リクエストされたレビュー担当者または Team は、Pull Request レビューをするようあなたが依頼したという通知を受け取ります。 {% ifversion fpt or ghae or ghes or ghec %}Team にレビューをリクエストし、コードレビューの割り当てが有効になっている場合、特定のメンバーがリクエストされ、Team はレビュー担当者として削除されます。 For more information, see "[Managing code review settings for your team](/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team)."{% endif %}
|
||||
To assign a reviewer to a pull request, you will need write access to the repository. For more information about repository access, see "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)." If you have write access, you can assign anyone who has read access to the repository as a reviewer.
|
||||
|
||||
Organization members with write access can also assign a pull request review to any person or team with read access to a repository. リクエストされたレビュー担当者または Team は、Pull Request レビューをするようあなたが依頼したという通知を受け取ります。 {% ifversion fpt or ghae or ghes or ghec %}Team にレビューをリクエストし、コードレビューの割り当てが有効になっている場合、特定のメンバーがリクエストされ、Team はレビュー担当者として削除されます。 For more information, see "[Managing code review settings for your team](/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team)."{% endif %}
|
||||
|
||||
{% note %}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ CODEOWNERS ファイルを使うためには、コードオーナーを追加し
|
||||
|
||||
コードオーナーがレビューのリクエストを受け取るためには、CODEOWNERS ファイルがプルリクエストの base ブランチになければなりません。 たとえばリポジトリ中の`gh-pages`ブランチの、*.js*ファイルのコードオーナーとして`@octocat`を割り当てたなら、*.js*に変更を加えるプルリクエストがheadブランチと`gh-pages`の間でオープンされると、`@octocat`はレビューのリクエストを受けることになります。
|
||||
|
||||
{% ifversion fpt or ghec or ghes > 3.2 or ghae-issue-9273 %}
|
||||
{% ifversion fpt or ghec or ghes > 3.2 or ghae-issue-4675 %}
|
||||
## CODEOWNERS file size
|
||||
|
||||
CODEOWNERS files must be under 3 MB in size. A CODEOWNERS file over this limit will not be loaded, which means that code owner information is not shown and the appropriate code owners will not be requested to review changes in a pull request.
|
||||
|
||||
@@ -7,7 +7,7 @@ versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
ghes: '>3.2'
|
||||
ghae-issue-4974: '*'
|
||||
ghae: issue-4974
|
||||
topics:
|
||||
- Repositories
|
||||
---
|
||||
|
||||
@@ -76,6 +76,7 @@ sections:
|
||||
- The latest release of the CodeQL CLI supports uploading analysis results to GitHub. This makes it easier to run code analysis for customers who wish to use CI/CD systems other than {% data variables.product.prodname_actions %}. Previously, such users had to use the separate CodeQL runner, which will continue to be available. For more information, see "[About CodeQL code scanning in your CI system](/enterprise-server@3.1/code-security/secure-coding/about-codeql-code-scanning-in-your-ci-system)."
|
||||
- '{% data variables.product.prodname_actions %} now supports skipping `push` and `pull_request` workflows by looking for some common keywords in your commit message.'
|
||||
- Check annotations older than four months will be archived.
|
||||
- Scaling of worker allocation for background tasks has been revised. We recommend validating that the new defaults are appropriate for your workload. Custom background worker overrides should be unset in most cases. [Updated 2022-03-18]
|
||||
|
||||
- heading: Security Changes
|
||||
notes:
|
||||
|
||||
@@ -29,6 +29,11 @@ sections:
|
||||
notes:
|
||||
- |
|
||||
{% data variables.product.prodname_dependabot %} is now available in {% data variables.product.prodname_ghe_server %} 3.4 as a public beta, offering both version updates and security updates for several popular ecosystems. {% data variables.product.prodname_dependabot %} on {% data variables.product.prodname_ghe_server %} requires {% data variables.product.prodname_actions %} and a pool of self-hosted runners configured for {% data variables.product.prodname_dependabot %} use. {% data variables.product.prodname_dependabot %} on {% data variables.product.prodname_ghe_server %} also requires {% data variables.product.prodname_github_connect %} and {% data variables.product.prodname_dependabot %} to be enabled by an administrator. Beta feedback and suggestions can be shared in the [{% data variables.product.prodname_dependabot %} Feedback GitHub discussion](https://github.com/github/feedback/discussions/categories/dependabot-feedback). For more information and to try the beta, see "[Setting up {% data variables.product.prodname_dependabot %} security and version updates on your enterprise](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/setting-up-dependabot-updates)."
|
||||
-
|
||||
heading: SAML authentication supports encrypted assertions
|
||||
notes:
|
||||
- |
|
||||
If you use SAML authentication for {% data variables.product.prodname_ghe_server %}, you can now configure encrypted assertions from your IdP to improve security. Encrypted assertions add an additional layer of encryption when your IdP transmits information to {% data variables.product.product_location %}. For more information, see "[Using SAML](/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-saml#enabling-encrypted-assertions)."
|
||||
changes:
|
||||
-
|
||||
heading: 管理に関する変更
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{% ifversion ghae %}
|
||||
{% ifversion ghae-issue-5752 %}
|
||||
|
||||
<!-- Remove this reusable and all references for GA release -->
|
||||
|
||||
{% elsif ghae %}
|
||||
|
||||
{% note %}
|
||||
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{% ifversion ghae %}
|
||||
{% ifversion ghae-issue-5752 %}
|
||||
|
||||
<!-- Remove this reusable and all references for GA release -->
|
||||
|
||||
{% elsif ghae %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**ノート:** Organizationが所有するリポジトリのための{% data variables.product.prodname_secret_scanning_caps %}は現在ベータで、変更されることがあります。
|
||||
|
||||
@@ -171,8 +171,10 @@ translations/ja-JP/content/packages/working-with-a-github-packages-registry/work
|
||||
translations/ja-JP/content/packages/working-with-a-github-packages-registry/working-with-the-rubygems-registry.md,broken liquid tags
|
||||
translations/ja-JP/content/pages/getting-started-with-github-pages/about-github-pages.md,broken liquid tags
|
||||
translations/ja-JP/content/pages/getting-started-with-github-pages/changing-the-visibility-of-your-github-pages-site.md,broken liquid tags
|
||||
translations/ja-JP/content/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site.md,broken liquid tags
|
||||
translations/ja-JP/content/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll.md,broken liquid tags
|
||||
translations/ja-JP/content/pages/setting-up-a-github-pages-site-with-jekyll/about-jekyll-build-errors-for-github-pages-sites.md,broken liquid tags
|
||||
translations/ja-JP/content/pages/setting-up-a-github-pages-site-with-jekyll/setting-a-markdown-processor-for-your-github-pages-site-using-jekyll.md,broken liquid tags
|
||||
translations/ja-JP/content/pages/setting-up-a-github-pages-site-with-jekyll/troubleshooting-jekyll-build-errors-for-github-pages-sites.md,broken liquid tags
|
||||
translations/ja-JP/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches.md,broken liquid tags
|
||||
translations/ja-JP/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repository.md,broken liquid tags
|
||||
|
||||
|
Reference in New Issue
Block a user