This repository has been archived by the owner on Jun 13, 2024. It is now read-only.
chore: Update workerd to 1.20231218.0 #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: dcard/workerd | |
tags: | | |
type=sha | |
type=raw,value=latest,enable={{is_default_branch}} | |
- name: Set up Bazel cache | |
uses: actions/cache@v3 | |
with: | |
path: bazel-cache | |
key: bazel-${{ hashFiles('Dockerfile') }} | |
restore-keys: bazel- | |
- name: Inject Bazel cache into Docker | |
uses: reproducible-containers/[email protected] | |
with: | |
cache-source: bazel-cache | |
cache-target: /root/.cache/bazel | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |