Skip to content

Commit 91a64f0

Browse files
authored
Merge pull request #45576 from github/repo-sync
Repo sync
2 parents 671c878 + 23ff8fc commit 91a64f0

File tree

3 files changed

+39
-5
lines changed

3 files changed

+39
-5
lines changed

content/actions/creating-actions/creating-a-composite-action.md

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ versions:
1010
ghae: '*'
1111
ghec: '*'
1212
type: tutorial
13+
defaultPlatform: linux
1314
topics:
1415
- Action development
1516
---
@@ -38,26 +39,51 @@ Before you begin, you'll create a repository on {% ifversion ghae %}{% data vari
3839
cd hello-world-composite-action
3940
```
4041

41-
1. In the `hello-world-composite-action` repository, create a new file called `goodbye.sh`, and add the following example code:
42+
1. In the `hello-world-composite-action` repository, create a new file called `goodbye.sh` with example code:
4243

43-
```bash copy
44-
echo "Goodbye"
44+
```shell copy
45+
echo "echo Goodbye" > goodbye.sh
4546
```
4647

4748
1. From your terminal, make `goodbye.sh` executable.
49+
{% linux %}
50+
51+
{% data reusables.actions.composite-actions-executable-linux-mac %}
52+
53+
{% endlinux %}
54+
{% mac %}
55+
56+
{% data reusables.actions.composite-actions-executable-linux-mac %}
57+
58+
{% endmac %}
59+
{% windows %}
4860

4961
```shell copy
50-
chmod +x goodbye.sh
62+
git add --chmod=+x -- goodbye.sh
5163
```
5264

65+
{% endwindows %}
66+
5367
1. From your terminal, check in your `goodbye.sh` file.
5468

69+
{% linux %}
70+
71+
{% data reusables.actions.composite-actions-commit-file-linux-mac %}
72+
73+
{% endlinux %}
74+
{% mac %}
75+
76+
{% data reusables.actions.composite-actions-commit-file-linux-mac %}
77+
{% endmac %}
78+
{% windows %}
79+
5580
```shell copy
56-
git add goodbye.sh
5781
git commit -m "Add goodbye script"
5882
git push
5983
```
6084

85+
{% endwindows %}
86+
6187
## Creating an action metadata file
6288

6389
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 "[AUTOTITLE](/actions/creating-actions/metadata-syntax-for-github-actions#runs-for-composite-actions)".
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
```shell copy
2+
git add goodbye.sh
3+
git commit -m "Add goodbye script"
4+
git push
5+
```
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```shell copy
2+
chmod +x goodbye.sh
3+
```

0 commit comments

Comments
 (0)