42 lines
1.0 KiB
YAML
42 lines
1.0 KiB
YAML
name: Build & Push CI Image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "Dockerfile.ci"
|
|
- ".gitea/workflows/build-ci-image.yaml"
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker BuildX
|
|
uses: docker/setup-buildx-action@v2
|
|
with:
|
|
config-inline: |
|
|
[registry."git.max-richter.dev"]
|
|
https = true
|
|
insecure = false
|
|
|
|
- name: Login to Gitea Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: git.max-richter.dev
|
|
username: ${{ gitea.actor }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Build and Push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile.ci
|
|
push: true
|
|
tags: |
|
|
git.max-richter.dev/${{ gitea.repository }}-ci:latest
|
|
git.max-richter.dev/${{ gitea.repository }}-ci:${{ gitea.sha }}
|