Skip to content

Update stats.json and sanitizers.js for data adjustments and cleanup #165

Update stats.json and sanitizers.js for data adjustments and cleanup

Update stats.json and sanitizers.js for data adjustments and cleanup #165

name: "Container Build"
on:
workflow_dispatch: # needed for manually running this workflow
schedule:
- cron: "15 3 * * *" # sadly there is no TZ support here
push:
branches:
- "main"
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Derive image coordinates
id: meta
run: |
set -euo pipefail
repo="${GITHUB_REPOSITORY,,}"
ref="${GITHUB_REF_NAME}"
sanitized_ref=$(echo "${ref}" | tr '[:upper:]' '[:lower:]' | sed 's#[^a-z0-9_.-]#-#g')
echo "image=ghcr.io/${repo}:${sanitized_ref}" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
file: container/Dockerfile
push: true
platforms: linux/amd64
build-args: |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
tags: ${{ steps.meta.outputs.image }}