Skip to content

Explain that a "list" means "of lines" not of YAML #5309

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 10, 2021

Conversation

kousu
Copy link
Contributor

@kousu kousu commented Apr 12, 2021

Why:

If I try

    - name: caching
      uses: actions/cache@v2
      with:
        path:
          - ~/.cache
        key: build-${{ github.ref }}
        restore-keys: |
          build-

I just get an unexplained "Startup Failure": https://github.com/spine-generic/data-multi-subject/actions/runs/742876119. Switching to a YAML multiline string

    - name: caching
      uses: actions/cache@v2
      with:
        path: |
          ~/.cache
        key: build-${{ github.ref }}
        restore-keys: |
          build-

works: https://github.com/spine-generic/data-multi-subject/actions/runs/742878382

What's being changed:

Check off the following:

If I try

```
    - name: caching
      uses: actions/cache@v2
      with:
        path:
          - ~/.cache
        key: build-${{ github.ref }}
        restore-keys: |
          build-
```

I just get an unexplained "Startup Failure": https://github.com/spine-generic/data-multi-subject/actions/runs/742876119. Switching to a YAML multiline string

```
    - name: caching
      uses: actions/cache@v2
      with:
        path: |
          ~/.cache
        key: build-${{ github.ref }}
        restore-keys: |
          build-
```

works: https://github.com/spine-generic/data-multi-subject/actions/runs/742878382
@welcome
Copy link

welcome bot commented Apr 12, 2021

Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Apr 12, 2021
@janiceilene
Copy link
Contributor

@kousu Thanks so much for opening a PR! I'll get this triaged for review ⚡

@janiceilene janiceilene added actions This issue or pull request should be reviewed by the docs actions team waiting for review Issue/PR is waiting for a writer's review and removed triage Do not begin working on this issue until triaged by the team labels Apr 12, 2021
@martin389 martin389 self-requested a review May 10, 2021 01:34
@martin389 martin389 self-assigned this May 10, 2021
@martin389 martin389 dismissed a stale review via faa3c52 May 10, 2021 02:25
@martin389
Copy link
Contributor

martin389 commented May 10, 2021

Changes in this PR

Article in staging Changes
Input parameters for the cache action Clarifies how to define multiple paths in path. Adds example.

Tests

All tests are passing! 🍏

@martin389
Copy link
Contributor

martin389 commented May 10, 2021

Thanks for the PR @kousu 🎊 This is really helpful!

I've also added an example codeblock to the section, because I noticed we don't demonstrate multiple paths in the article.
Added the multiple path example from https://docs.github.com/en/actions/guides/building-and-testing-java-with-gradle#caching-dependencies

@martin389 martin389 dismissed a stale review via e090495 May 10, 2021 03:45
@martin389
Copy link
Contributor

Added some edits based on peer review

@martin389 martin389 merged commit 8d689fc into github:main May 10, 2021
@github-actions
Copy link
Contributor

Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actions This issue or pull request should be reviewed by the docs actions team waiting for review Issue/PR is waiting for a writer's review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants