-
Notifications
You must be signed in to change notification settings - Fork 389
Fix typos and improve clarity in build-cache.md #101
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added initial findings. More may come when I've run the exercise myself.
@@ -27,20 +27,188 @@ The example for gradle can be seen below. | |||
${{ runner.os }}-gradle- | |||
``` | |||
|
|||
To use cache at the consequtive jobs, the same code (from above example) has to be added as a step. | |||
To use cache at the consecutive jobs, the same code (from above example) has to be added as a step to each job. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To use cache at the consecutive jobs, the same code (from above example) has to be added as a step to each job. | |
To use the cache in subsequent jobs, a step with the same cache configuration has to be added to each job. |
The change from "consecutive" to "subsequent" is most important. The rest of the suggestion just my preference.
## Recap: Caching vs. Artifacts | ||
`actions/cache`: Its purpose is to speed up future workflow runs by saving and reusing files that don't change often, like third-party dependencies (~/.gradle/caches). It is not designed to pass files between jobs in the same run. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Recap: Caching vs. Artifacts | |
`actions/cache`: Its purpose is to speed up future workflow runs by saving and reusing files that don't change often, like third-party dependencies (~/.gradle/caches). It is not designed to pass files between jobs in the same run. | |
## Recap: Caching vs. Artifacts | |
`actions/cache`: Its purpose is to speed up future workflow runs by saving and reusing files that don't change often, like third-party dependencies (~/.gradle/caches). It is not designed to pass files between jobs in the same run. |
Nitpick: There should be a newline after headings
In this exercise the artifacts management in the existing pipeline will be changed to use caching instead as follow: | ||
In this exercise we will implement caching as follows: | ||
|
||
1. Create a new GitHub Actions file under `./github/workflows/caching.yaml` with exact copy of the pipeline from [exercise 7](../trainer/.github/workflows/caching.yaml) . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit iffy on terminology here. I would expect it to be called a "GitHub Actions workflow file"? Or here, maybe just a "workflow file", since we're already in context of GitHub Actions. The more we sprinkle GitHub Actions around, the more it sounds like marketing material for GitHub.
1. Create a new GitHub Actions file under `./github/workflows/caching.yaml` with exact copy of the pipeline from [exercise 7](../trainer/.github/workflows/caching.yaml) . | |
1. Create a new workflow file under `./github/workflows/caching.yaml` with an exact copy of the pipeline from [exercise 7](../trainer/.github/workflows/caching.yaml) . |
This pull request updates the
labs/build-cache.md
file to improve clarity, correct terminology, and enhance the guidance on caching and artifact usage in GitHub Actions workflows. The most important changes include fixing typos, adding a comparison of caching vs. artifacts, and providing a detailed example workflow for caching and artifact management.docker/build-push-action
for efficient Docker layer caching and suggested changing workflow triggers toworkflow_dispatch
to avoid unnecessary runs.