Skip to content

Update all non-major dependencies (#359) #75

Update all non-major dependencies (#359)

Update all non-major dependencies (#359) #75

Workflow file for this run

name: Upload site as docker image to ghcr.io
on:
push:
branches:
- main
paths:
- "site/**"
- ".github/workflows/static-site.yml"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
upload:
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install
run: npm i
working-directory: ./site
- name: Build
run: npm run build
working-directory: ./site
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# Build and push Docker image with Buildx
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push-signalr
uses: docker/build-push-action@v6
with:
context: site
file: site/Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ghcr.io/liammorrow/liftlog:site
labels: ${{ steps.meta.outputs.labels }}