41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
|
|
name: Build CI Image
|
||
|
|
|
||
|
|
on:
|
||
|
|
push:
|
||
|
|
branches: [main]
|
||
|
|
paths:
|
||
|
|
- '.forgejo/ci/Dockerfile'
|
||
|
|
- '.forgejo/workflows/ci-image.yml'
|
||
|
|
pull_request:
|
||
|
|
paths:
|
||
|
|
- '.forgejo/ci/Dockerfile'
|
||
|
|
- '.forgejo/workflows/ci-image.yml'
|
||
|
|
|
||
|
|
jobs:
|
||
|
|
build:
|
||
|
|
runs-on: docker
|
||
|
|
container:
|
||
|
|
image: catthehacker/ubuntu:act-latest
|
||
|
|
|
||
|
|
steps:
|
||
|
|
- uses: https://data.forgejo.org/actions/checkout@v4
|
||
|
|
|
||
|
|
- name: Set up Docker Buildx
|
||
|
|
uses: https://data.forgejo.org/docker/setup-buildx-action@v3
|
||
|
|
|
||
|
|
- name: Login to Forgejo Registry
|
||
|
|
uses: https://data.forgejo.org/docker/login-action@v3
|
||
|
|
with:
|
||
|
|
registry: forge.lvl0.xyz
|
||
|
|
username: ${{ github.actor }}
|
||
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||
|
|
|
||
|
|
- name: Build and push
|
||
|
|
uses: https://data.forgejo.org/docker/build-push-action@v5
|
||
|
|
with:
|
||
|
|
context: .forgejo/ci
|
||
|
|
file: .forgejo/ci/Dockerfile
|
||
|
|
platforms: linux/amd64
|
||
|
|
push: ${{ github.event_name != 'pull_request' }}
|
||
|
|
tags: forge.lvl0.xyz/lvl0/rater-ci:latest
|