Skip to content

Commit

Permalink
Revert broken translated files to english (github#17126)
Browse files Browse the repository at this point in the history
  • Loading branch information
vanessayuenn committed Jan 4, 2021
1 parent d5b3f55 commit 355f074
Showing 1 changed file with 69 additions and 79 deletions.
Original file line number Diff line number Diff line change
@@ -1,139 +1,129 @@
---
title: 複合実行ステップ アクションの作成
intro: 'このガイドでは、複合実行ステップ アクションを構築する方法について説明します。'
title: Creating a composite run steps action
intro: 'In this guide, you''ll learn how to build a composite run steps action.'
product: '{% data reusables.gated-features.actions %}'
versions:
free-pro-team: '*'
enterprise-server: '>=2.22'
---

{% data variables.product.prodname_actions %} の支払いを管理する
{% data variables.product.prodname_dotcom %}は、macOSランナーのホストに[MacStadium](https://www.macstadium.com/)を使用しています。
{% data reusables.actions.enterprise-beta %}
{% data reusables.actions.enterprise-github-hosted-runners %}

### はじめに
### Introduction

このガイドでは、パッケージ化された複合実行ステップ アクションを作成および使用するために必要な基本的なコンポーネントについて説明します。 アクションのパッケージ化に必要なコンポーネントのガイドに焦点を当てるため、アクションのコードの機能は最小限に留めます。 アクションは「ハローワールド」と「さよなら」を印刷するか、カスタム名を指定すると「こんにちは [who-to-greet]」と「さようなら」を出力します。 このアクションでは、乱数も `乱数` 出力変数にマップされ、 `goodbye.sh`という名前のスクリプトが実行されます。
In this guide, you'll learn about the basic components needed to create and use a packaged composite run steps action. To focus this guide on the components needed to package the action, the functionality of the action's code is minimal. The action prints "Hello World" and then "Goodbye", or if you provide a custom name, it prints "Hello [who-to-greet]" and then "Goodbye". The action also maps a random number to the `random-number` output variable, and runs a script named `goodbye.sh`.

このプロジェクトを完了したら、独自の複合実行ステップ アクションをビルドし、ワークフローでテストする方法を理解する必要があります。
Once you complete this project, you should understand how to build your own composite run steps action and test it in a workflow.

### 必要な環境
### Prerequisites

始める前に、{% data variables.product.product_name %} リポジトリを作成します。
Before you begin, you'll create a {% data variables.product.product_name %} repository.

1. {% data variables.product.product_location %} に新しいパブリックリポジトリを作成します。 任意のリポジトリ名を選択するか、hello-world コンポジット実行ステップアクション</code> 例 `次の方法を使用できます。 これらのファイルは、プロジェクトを {% data variables.product.product_name %}にプッシュした後で追加できます。 詳しい情報については、「<a href="/articles/creating-a-new-repository">新しいリポジトリの作成</a>」を参照してください。</p></li>
<li><p spaces-before="0">リポジトリをお手元のコンピューターにクローンします。 詳しい情報については<a href="/articles/cloning-a-repository">リポジトリのクローン</a>を参照してください。</p></li>
<li><p spaces-before="0">ターミナルから、ディレクトリを新しいリポジトリに変更します。
<pre><code class="shell"> cd ハローワールドコンポジット実行ステップアクション
`</pre>
1. Create a new public repository on {% data variables.product.product_location %}. You can choose any repository name, or use the following `hello-world-composite-run-steps-action` example. You can add these files after your project has been pushed to {% data variables.product.product_name %}. For more information, see "[Create a new repository](/articles/creating-a-new-repository)."

2. `hello-world-composite-run-steps-action` リポジトリで、 `goodbye.sh`という名前の新しいファイルを作成し、次のコード例を追加します。
1. Clone your repository to your computer. For more information, see "[Cloning a repository](/articles/cloning-a-repository)."

1. From your terminal, change directories into your new repository.

```shell
cd hello-world-composite-run-steps-action
```

2. In the `hello-world-composite-run-steps-action` repository, create a new file called `goodbye.sh`, and add the following example code:

```bash
エコー"さようなら"
echo "Goodbye"
```

3. ターミナルから、`goodbye.sh` を実行可能にします。
3. From your terminal, make `goodbye.sh` executable.

```shell
chmod +x goodbye.sh
```

1. 端末から、 `goodbye.sh` ファイルをチェックインします。
1. From your terminal, check in your `goodbye.sh` file.
```shell
git を追加goodbye.sh
git コミット -m "さよならスクリプトを追加"
git プッシュ
git add goodbye.sh
git commit -m "Add goodbye script"
git push
```

### アクションのメタデータファイルの作成
### Creating an action metadata file

1. `hello-world-composite-run-steps-action` リポジトリで、action.yml</code> `という名前の新しいファイルを作成し、次のコード例を追加します。 この構文の詳細については、「<a href="/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-composite-run-steps-actions"><code>実行` 」を参照</a>してください。
1. In the `hello-world-composite-run-steps-action` repository, create a new file called `action.yml` and add the following example code. For more information about this syntax, see "[`runs` for a composite run steps](/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-composite-run-steps-actions)".

{% raw %}
**アクション.yml**
**action.yml**
```yaml
name:Hello World
の説明:「 誰かに挨拶する」
入力:
誰が挨拶する:入力
説明の#id:「誰を迎えるか」が必要
です:true
デフォルト
:
デフォルト:
の乱数:説明:${{ steps.random-number-generator.outputs.random-id }}
:
使用:
- 実行:エコーこんにちは{{ inputs.who-to-greet }}
シェル: バッシュ
- id: 乱数ジェネレータ
実行: echo "::セット出力名=ランダム id::$(エコー $RANDOM)"
シェル: バッシュ
- 実行: ${{ github.action_path }}/goodbye.sh
シェル: bash
name: 'Hello World'
description: 'Greet someone'
inputs:
who-to-greet: # id of input
description: 'Who to greet'
required: true
default: 'World'
outputs:
random-number:
description: "Random number"
value: ${{ steps.random-number-generator.outputs.random-id }}
runs:
using: "composite"
steps:
- run: echo Hello ${{ inputs.who-to-greet }}.
shell: bash
- id: random-number-generator
run: echo "::set-output name=random-id::$(echo $RANDOM)"
shell: bash
- run: ${{ github.action_path }}/goodbye.sh
shell: bash
```
{% endraw %}
このファイルは、入力</code> に誰が挨拶 `を定義し、ランダムに生成された数値を <code>乱数` 出力変数にマップし、 `goodbye.sh` スクリプトを実行します。 また、複合実行ステップアクションの実行方法をランナーに指示します。

出力の管理の詳細については、「複合実行手順の出力</code> を[`する」</a>参照してください。 </p>
This file defines the `who-to-greet` input, maps the random generated number to the `random-number` output variable, and runs the `goodbye.sh` script. It also tells the runner how to execute the composite run steps action.

<p spaces-before="2"><code>github.action_path`の使用方法の詳細については、「github コンテキスト</code>](/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-composite-run-steps-actions)の

`」を参照してください。</p></li>
<li><p spaces-before="0">ターミナルから、<code>action.yml` ファイルをチェックインします。
For more information about managing outputs, see "[`outputs` for a composite run steps](/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-composite-run-steps-actions)".

For more information about how to use `github.action_path`, see "[`github context`](/actions/reference/context-and-expression-syntax-for-github-actions#github-context)".

1. From your terminal, check in your `action.yml` file.

```shell
git add action.yml
git commit -m "Add action"
git push
```
</p></li>

1 ターミナルから、タグを追加します。 この例では、`v1` というタグを使用しています。 詳しい情報については、「[アクションについて](/actions/creating-actions/about-actions#using-release-management-for-actions)」を参照してください。


1. From your terminal, add a tag. This example uses a tag called `v1`. For more information, see "[About actions](/actions/creating-actions/about-actions#using-release-management-for-actions)."

```shell
git tag -a -m "Description of this release" v1
git push --follow-tags
```
</ol>


### Testing out your action in a workflow

### ワークフローでアクションを試す
The following workflow code uses the completed hello world action that you made in "[Creating an action metadata file](/actions/creating-actions/creating-a-composite-run-steps-action#creating-an-action-metadata-file)".

次のワークフロー コードでは、「アクション メタデータ ファイルの作成」で行った完了した hello world アクション[使用](/actions/creating-actions/creating-a-composite-run-steps-action#creating-an-action-metadata-file)。

ワークフローコードを別のリポジトリの `.github/workflows/main.yml` ファイルにコピーしますが、`actions/hello-world-composite-run-steps-action@v1` は作成したリポジトリとタグに置き換えます。 `who-to-greet` 入力を自分の名前に置き換えることもできます。
Copy the workflow code into a `.github/workflows/main.yml` file in another repository, but replace `actions/hello-world-composite-run-steps-action@v1` with the repository and tag you created. You can also replace the `who-to-greet` input with your name.

{% raw %}

**.github/ワークフロー/メイン.yml**


**.github/workflows/main.yml**
```yaml
on: [push]
ジョブ:
jobs:
hello_world_job:
実行: ubuntu-latest
名: こんにちは
ステップを言うジョブ:
- 使用: アクション/checkout@v2
runs-on: ubuntu-latest
name: A job to say hello
steps:
- uses: actions/checkout@v2
- id: foo
使用: アクション/ハローワールドコンポジットランステップaction@v1
:
誰が挨拶: 'モナ・ザ・オクトキャット'
- 実行: エコー乱数 ${{ steps.foo.outputs.random-number }}
シェル:
uses: actions/hello-world-composite-run-steps-action@v1
with:
who-to-greet: 'Mona the Octocat'
- run: echo random-number ${{ steps.foo.outputs.random-number }}
shell: bash
```


{% endraw %}

リポジトリから [**Actions**] タブをクリックして、最新のワークフロー実行を選択します。 出力には、「こんにちはモナオクトキャット」、"Goodbye"スクリプトの結果、および乱数が含まれている必要があります。
From your repository, click the **Actions** tab, and select the latest workflow run. The output should include: "Hello Mona the Octocat", the result of the "Goodbye" script, and a random number.

0 comments on commit 355f074

Please sign in to comment.