Skip to content

Add handsaw

Add handsaw #25

Workflow file for this run

name: Build
on:
push:
branches:
- master
env:
REGISTRY: ghcr.io
jobs:
build-client:
runs-on: ubuntu-latest
env:
IMAGE_NAME: ${{ github.repository }}/client
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
logout: true
- name: Extract metdata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,format=short,prefix=,suffix=
type=ref,event=branch
type=ref,event=tag
type=raw,value=latest
- name: Build and push
id: push
uses: docker/build-push-action@v6
with:
push: true
file: client.Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
build-server:
runs-on: ubuntu-latest
env:
IMAGE_NAME: ${{ github.repository }}/server
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
logout: true
- name: Extract metdata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,format=short,prefix=,suffix=
type=ref,event=branch
type=ref,event=tag
type=raw,value=latest
- name: Build and push
id: push
uses: docker/build-push-action@v6
with:
push: true
file: server.Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true