Skip to content

cleanup

cleanup #9

Workflow file for this run

---
name: Build
on:
push:
jobs:
Build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/metadata-action@v5
id: meta
with:
images: Build
- name: Cache (S3)
uses: tespkg/actions-cache@v1
id: cache
with:
bucket: gha-docker-npm-caching-example
accessKey: ${{ vars.AWS_ACCESS_KEY }}
secretKey: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
use-fallback: false # No fallback since the purpose of this example is to demonstrate the cache to S3
path: |
pnpm
key: pnpm-cache-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
pnpm-cache-
- name: inject cache into docker
uses: reproducible-containers/buildkit-cache-dance@v3.1.0
with:
cache-map: |
{
"pnpm": "/pnpm"
}
skip-extraction: ${{ steps.cache.outputs.cache-hit }}
- name: Build
uses: docker/build-push-action@v5
with:
context: .
cache-from: type=gha
cache-to: type=gha,mode=max
file: Dockerfile
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}