From a712ef30a35b27e5b3a5f1acc95b174983440248 Mon Sep 17 00:00:00 2001 From: Mike McDonald <2575327+asciimike@users.noreply.github.com> Date: Thu, 4 Mar 2021 10:51:58 -0700 Subject: [PATCH 1/2] Bump to upload-artifact@v2 (#3631) --- .../essential-features-of-github-actions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/actions/learn-github-actions/essential-features-of-github-actions.md b/content/actions/learn-github-actions/essential-features-of-github-actions.md index 6d8a072b95..e129ae1919 100644 --- a/content/actions/learn-github-actions/essential-features-of-github-actions.md +++ b/content/actions/learn-github-actions/essential-features-of-github-actions.md @@ -75,7 +75,7 @@ jobs: run: | expr 1 + 1 > output.log - name: Upload output file - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v2 with: name: output-log-file path: output.log From 136a6bd1a378afc1670d1e83e4c23e5e9f75158d Mon Sep 17 00:00:00 2001 From: Bradyn Poulsen Date: Thu, 4 Mar 2021 11:03:28 -0700 Subject: [PATCH 2/2] Actions Docs: Using workflows from other private repositories (#3627) Co-authored-by: Sarah Edwards --- .../workflow-syntax-for-github-actions.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/content/actions/reference/workflow-syntax-for-github-actions.md b/content/actions/reference/workflow-syntax-for-github-actions.md index 52bc46be2d..9883e1bca3 100644 --- a/content/actions/reference/workflow-syntax-for-github-actions.md +++ b/content/actions/reference/workflow-syntax-for-github-actions.md @@ -638,6 +638,27 @@ jobs: uses: docker://gcr.io/cloud-builders/gradle ``` +#### Example using action inside a different private repository than the workflow + +Your workflow must checkout the private repository and reference the action locally. + +{% raw %} +```yaml +jobs: + my_first_job: + steps: + - name: Check out repository + uses: actions/checkout@v2 + with: + repository: octocat/my-private-repo + ref: v1.0 + token: ${{ secrets.GITHUB_TOKEN }} + path: ./.github/actions/my-private-repo + - name: Run my action + uses: ./.github/actions/my-private-repo/my-action +``` +{% endraw %} + ### `jobs..steps[*].run` 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.