Skip to content

Commit cb74aae

Browse files
authored
Merge branch 'main' into patch-1
2 parents 992cfa3 + 136a6bd commit cb74aae

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

content/actions/learn-github-actions/essential-features-of-github-actions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
run: |
7676
expr 1 + 1 > output.log
7777
- name: Upload output file
78-
uses: actions/upload-artifact@v1
78+
uses: actions/upload-artifact@v2
7979
with:
8080
name: output-log-file
8181
path: output.log

content/actions/reference/workflow-syntax-for-github-actions.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,27 @@ jobs:
638638
uses: docker://gcr.io/cloud-builders/gradle
639639
```
640640

641+
#### Example using action inside a different private repository than the workflow
642+
643+
Your workflow must checkout the private repository and reference the action locally.
644+
645+
{% raw %}
646+
```yaml
647+
jobs:
648+
my_first_job:
649+
steps:
650+
- name: Check out repository
651+
uses: actions/checkout@v2
652+
with:
653+
repository: octocat/my-private-repo
654+
ref: v1.0
655+
token: ${{ secrets.GITHUB_TOKEN }}
656+
path: ./.github/actions/my-private-repo
657+
- name: Run my action
658+
uses: ./.github/actions/my-private-repo/my-action
659+
```
660+
{% endraw %}
661+
641662
### `jobs.<job_id>.steps[*].run`
642663

643664
Runs command-line programs using the operating system's shell. If you do not provide a `name`, the step name will default to the text specified in the `run` command.

0 commit comments

Comments
 (0)