mnemo_cards/.forgejo/workflows/build-agent-image.yaml

42 lines
969 B
YAML
Raw Normal View History

2025-11-21 07:25:43 +00:00
name: Build Agent Image
on:
push:
paths:
- 'tools/agent/Dockerfile'
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
2025-11-21 08:00:02 +00:00
- name: Install Docker CLI
run: |
apt-get update
apt-get install -y docker.io
2025-11-21 08:40:12 +00:00
- name: Free Disk Space
run: |
docker system prune -af
docker volume prune -f
2025-11-21 07:25:43 +00:00
- name: Checkout
2025-11-21 07:56:05 +00:00
uses: actions/checkout@v3
2025-11-21 07:25:43 +00:00
2025-11-21 08:04:26 +00:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
2025-11-21 07:25:43 +00:00
- name: Login to Forgejo Registry
2025-11-21 08:04:26 +00:00
uses: docker/login-action@v2
2025-11-21 07:25:43 +00:00
with:
registry: code.mnemo-cards.online
username: ${{ github.actor }}
2025-11-21 09:02:25 +00:00
password: ${{ secrets.FORGEJO_TOKEN }}
2025-11-21 07:25:43 +00:00
- name: Build and Push
2025-11-21 08:04:26 +00:00
uses: docker/build-push-action@v4
2025-11-21 07:25:43 +00:00
with:
context: tools/agent
push: true
tags: code.mnemo-cards.online/${{ github.repository }}/agent:latest