41 lines
969 B
YAML
41 lines
969 B
YAML
name: Build Agent Image
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'tools/agent/Dockerfile'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install Docker CLI
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y docker.io
|
|
|
|
- name: Free Disk Space
|
|
run: |
|
|
docker system prune -af
|
|
docker volume prune -f
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Login to Forgejo Registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: code.mnemo-cards.online
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.FORGEJO_TOKEN }}
|
|
|
|
- name: Build and Push
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: tools/agent
|
|
push: true
|
|
tags: code.mnemo-cards.online/${{ github.repository }}/agent:latest
|