GitHub Actions 1 cheatsheet
GitHub Actions 1: Languages, caching and artifacts
5 common GitHub Actions 1 tasks.
Set up Node.js with caching
Install a Node.js version and cache npm downloads.
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
Set up Python with caching
Install Python and cache pip downloads.
- uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: pip
Cache files between runs
Cache any folder, keyed by a hash of a lock file.
- uses: actions/cache@v4
with:
path: ~/.cache
key: ${{ runner.os }}-cache-${{ hashFiles('**/lockfile') }}
Upload a build artifact
Save files from a job so you can download them or use them in a later job.
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
Download an artifact in another job
Fetch an artifact produced earlier in the workflow.
- uses: actions/download-artifact@v4
with:
name: dist