Skip to content

Docker Image CI

Docker Image CI #10

name: Docker Image CI
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 6'
push:
branches:
- master
- internal
- "[1-9]+.[0-9]+.[0-9]+"
paths-ignore:
- '.gitignore'
- '**.md'
- '**.template'
release:
types: # This configuration does not affect the page_build event above
- created
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to GitHub Docker Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push images
run: |
docker buildx build --push --platform linux/amd64,linux/arm64 --tag ghcr.io/${{ github.repository }}/valhalla:latest .