You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
27
27
@@ -35,7 +35,7 @@ Aktionen können direkt auf einem Computer oder in einem Docker-Container laufen
35
35
36
36
## Arten von Aktionen
37
37
38
-
Du kannst Docker-Container- und JavaScript-Aktionen erstellen. Aktionen benötigen eine Metadaten-Datei, in der die Eingaben, Ausgaben und der Haupteinstiegspunkt für die Aktion definiert werden. Der Name der Metadatendatei muss entweder `action.yml` oder `action.yaml` lauten. Weitere Informationen findest du unter [Metadatensyntax für {% data variables.product.prodname_actions %}](/articles/metadata-syntax-for-github-actions).
38
+
Du kannst Docker-Container-, JavaScript- und zusammengesetzte Aktionen erstellen. Aktionen benötigen eine Metadaten-Datei, in der die Eingaben, Ausgaben und der Haupteinstiegspunkt für die Aktion definiert werden. Der Name der Metadatendatei muss entweder `action.yml` oder `action.yaml` lauten. Weitere Informationen findest du unter [Metadatensyntax für {% data variables.product.prodname_actions %}](/articles/metadata-syntax-for-github-actions).
39
39
40
40
| type | Betriebssystem |
41
41
| ---- | ------------------- |
@@ -169,6 +169,6 @@ Sowohl {% data variables.product.prodname_actions %} als auch {% data variables.
169
169
* Erfordern weder, dass du Code noch eine App bereitstellst.
170
170
* Du benötigst eine einfache Schnittstelle zum Erstellen und Verwenden von Geheimnissen. Dadurch können die Aktionen mit Diensten von Drittanbietern interagieren, ohne die Anmelde-Informationen des Aktions-Benutzers speichern zu müssen.
171
171
172
-
## Weiterführende Themen
172
+
## Weitere Informationsquellen
173
173
174
174
- [Entwicklungstools für {% data variables.product.prodname_actions %}](/articles/development-tools-for-github-actions)
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
16
23
17
-
{% data reusables.actions.enterprise-beta %}
18
-
{% data reusables.actions.enterprise-github-hosted-runners %}
24
+
## Einführung
19
25
20
-
## Introduction
26
+
In dieser Anleitung erfährst du mehr über die grundlegenden Komponenten, die benötigt werden, um eine paketierte zusammengesetzte Aktion zu erstellen und zu verwenden. Diese Anleitung fokussiert jene Komponenten, welche zum Paketieren der Aktion benötigt werden. Daher hat der Aktions-Code nur minimale Funktionalität. Die Aktion gibt „Hello World“ und dann „Goodbye“ bzw. nach Angabe eines benutzerdefinierten Namens „Hello [who-to-greet]“ und dann „Goodbye“ aus. Zudem ordnet die Aktion der Ausgabevariablen `random-number` eine Zufallszahl zu und führt ein Skript namens `goodbye.sh` aus.
21
27
22
-
In this guide, you'll learn about the basic components needed to create and use a packaged composite 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`.
23
-
24
-
Once you complete this project, you should understand how to build your own composite action and test it in a workflow.
28
+
Nach dem Abschluss dieses Projekts weißt du, wie du eine eigene zusammengesetzte Aktion erstellen und in einem Workflow testen kannst.
25
29
26
30
{% data reusables.actions.context-injection-warning %}
27
31
28
-
## Prerequisites
32
+
## Voraussetzungen
29
33
30
-
Before you begin, you'll create a repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}.
34
+
Bevor du beginnst, erstellst du ein Repository auf {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}.
31
35
32
-
1.Create a new public repository on {% data variables.location.product_location %}. You can choose any repository name, or use the following `hello-world-composite-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)."
36
+
1.Erstelle ein neues öffentliches Repository auf {% data variables.location.product_location %}. Du kannst einen beliebigen Repositorynamen auswählen oder das folgende `hello-world-composite-action`-Beispiel verwenden. Du kannst diese Dateien hinzufügen, nachdem dein Projekt per Push an {% data variables.product.product_name %} übergeben wurde. Weitere Informationen findest du unter [Erstellen eines neuen Repositorys](/articles/creating-a-new-repository).
33
37
34
-
1.Clone your repository to your computer. For more information, see "[Cloning a repository](/articles/cloning-a-repository)."
38
+
1.Klone dein Repository auf deinen Computer. Weitere Informationen findest du unter [Klonen eines Repositorys](/articles/cloning-a-repository).
35
39
36
-
1.From your terminal, change directories into your new repository.
40
+
1.Gehe in deinem Terminal zum Verzeichnisse deines neuen Repositorys.
37
41
38
42
```shell
39
43
cd hello-world-composite-action
40
44
```
41
45
42
-
2.In the `hello-world-composite-action`repository, create a new file called `goodbye.sh`, and add the following example code:
46
+
2.Erstelle im Repository `hello-world-composite-action`eine neue Datei namens `goodbye.sh`, und füge den folgenden Beispielcode hinzu:
43
47
44
48
```bash
45
49
echo"Goodbye"
46
50
```
47
51
48
-
3.From your terminal, make `goodbye.sh`executable.
52
+
3.Lege `goodbye.sh`über das Terminal als ausführbare Datei fest.
49
53
50
54
```shell
51
55
chmod +x goodbye.sh
52
56
```
53
57
54
-
1.From your terminal, check in your `goodbye.sh`file.
58
+
1.Checke die Datei `goodbye.sh`über das Terminal ein.
55
59
```shell
56
60
git add goodbye.sh
57
61
git commit -m "Add goodbye script"
58
62
git push
59
63
```
60
64
61
-
## Creating an action metadata file
65
+
## Eine Datei für die Metadaten der Aktion erstellen
62
66
63
-
1.In the `hello-world-composite-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 actions](/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-composite-actions)".
67
+
1.Erstelle im Repository `hello-world-composite-action`eine neue Datei namens `action.yml`, und füge den folgenden Beispielcode hinzu. Weitere Informationen zu dieser Syntax findest du unter [`runs`für eine zusammengesetzte Aktion](/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-composite-actions).
64
68
65
-
{% raw %}
66
-
**action.yml**
69
+
{% raw %} **action.yml**
67
70
```yaml
68
71
name: 'Hello World'
69
72
description: 'Greet someone'
@@ -93,33 +96,32 @@ Before you begin, you'll create a repository on {% ifversion ghae %}{% data vari
93
96
- run: goodbye.sh
94
97
shell: bash
95
98
```
96
-
{% endraw %}
97
-
This file defines the `who-to-greet` input, maps the random generated number to the `random-number` output variable, adds the action's path to the runner system path (to locate the `goodbye.sh` script during execution), and runs the `goodbye.sh` script.
99
+
{% endraw %} Diese Datei definiert die `who-to-greet`-Eingabe, ordnet die zufällig generierte Zahl der Ausgabevariablen `random-number` zu, fügt den Pfad der Aktion zum Systempfad des Runners hinzu (um das Skript `goodbye.sh` während der Ausführung ausfindig zu machen) und führt das Skript `goodbye.sh` aus.
98
100
99
-
For more information about managing outputs, see "[`outputs` for a composite action](/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-composite-actions)".
101
+
Weitere Informationen zum Verwalten von Ausgaben findest du unter [`outputs` für eine zusammengesetzte Aktion](/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-composite-actions).
100
102
101
-
For more information about how to use `github.action_path`, see "[`github context`](/actions/reference/context-and-expression-syntax-for-github-actions#github-context)".
103
+
Weitere Informationen zum Verwenden von `github.action_path` findest du unter [`github context`](/actions/reference/context-and-expression-syntax-for-github-actions#github-context).
102
104
103
-
1. From your terminal, check in your `action.yml` file.
105
+
1. Checke die Datei `action.yml` über das Terminal ein.
104
106
105
107
```shell
106
108
git add action.yml
107
109
git commit -m "Add action"
108
110
git push
109
111
```
110
112
111
-
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)."
113
+
1. Füge über das Terminal ein Tag hinzu. In diesem Beispiel wird ein Tag namens `v1` verwendet. Weitere Informationen findest du unter [Informationen zu Aktionen](/actions/creating-actions/about-actions#using-release-management-for-actions).
112
114
113
115
```shell
114
116
git tag -a -m "Description of this release" v1
115
117
git push --follow-tags
116
118
```
117
119
118
-
## Testing out your action in a workflow
120
+
## Deine Aktion in einem Workflow testen
119
121
120
-
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-action#creating-an-action-metadata-file)".
122
+
Der folgende Workflowcode verwendet die abgeschlossene „Hello World“-Aktion, die du unter [Erstellen einer Aktionsmetadatendatei](/actions/creating-actions/creating-a-composite-action#creating-an-action-metadata-file) erstellt hast.
121
123
122
-
Copy the workflow code into a `.github/workflows/main.yml` file in another repository, but replace `actions/hello-world-composite-action@v1` with the repository and tag you created. You can also replace the `who-to-greet` input with your name.
124
+
Kopiere den Workflowcode in eine Datei `.github/workflows/main.yml` in einem anderen Repository, aber ersetze `actions/hello-world-composite-action@v1` durch das von dir erstellte Repository und Tag. Du kannst auch die Eingabe für `who-to-greet` durch deinen Namen ersetzen.
123
125
124
126
**.github/workflows/main.yml**
125
127
```yaml
@@ -139,4 +141,4 @@ jobs:
139
141
shell: bash
140
142
```
141
143
142
-
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.
144
+
Klicke in deinem Repository auf die Registerkarte **Aktionen**, und wähle die neueste Workflowausführung aus. Die Ausgabe sollte Folgendes enthalten: „Hello Mona the Octocat“, das Ergebnis des Skripts „Goodbye“ und eine zufällige Zahl.
0 commit comments