Skip to content

chore: combine marginalia and beauty #408

chore: combine marginalia and beauty

chore: combine marginalia and beauty #408

Workflow file for this run

name: CI
on:
push:
branches:
- "main"
tags:
- "v*.*.*"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
docker:
runs-on: ubuntu-latest
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: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
${{ vars.DOCKERHUB_USERNAME }}/cat-emacs
ghcr.io/${{ github.repository }}
- name: Get current week
run: echo "WEEK=$(date +'%Y W%V')" >> $GITHUB_ENV
- name: Apt Cache for Docker
uses: actions/cache@v4
id: apt-cache
with:
path: |
var-cache-apt
var-lib-apt
key: apt-cache-${{ hashFiles('Dockerfile') }}
- name: Inject apt-cache into docker
uses: reproducible-containers/buildkit-cache-dance@v3
with:
cache-map: |
{
"var-cache-apt": "/var/cache/apt",
"var-lib-apt": "/var/lib/apt"
}
skip-extraction: ${{ steps.apt-cache.outputs.cache-hit }}
- name: Emacs Build Cache for Docker
uses: actions/cache@v4
id: emacs-cache
with:
path: |
emacs-packages
emacs-eln-cache
key: ${{ runner.os }}-emacs-cache-${{ env.WEEK }}
- name: Inject emacs-cache into docker
uses: reproducible-containers/buildkit-cache-dance@v3
with:
cache-map: |
{
"emacs-packages": "/root/.emacs.d/elpa",
"emacs-eln-cache": "/root/.emacs.d/eln-cache"
}
skip-extraction: ${{ steps.emacs-cache.outputs.cache-hit }}
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
CI=true