This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
name: Build and Publish Runner Image
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
schedule:
|
||||
# Run at 03:00 every Sunday to keep the base image fresh
|
||||
- cron: '0 3 * * 0'
|
||||
|
||||
env:
|
||||
# Adjust this if your Gitea domain is different
|
||||
REGISTRY: gitlab.julian-mutter.de
|
||||
# This automatically evaluates to your user/repo name (e.g., julian/nix-ci-runner)
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
# We use the standard ubuntu-latest to build our custom runner
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Gitea Actions automatically provides a token that can push to its own registry
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
# Tags it as 'latest'. If you push to main, it updates 'latest'.
|
||||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
|
||||
Reference in New Issue
Block a user