ci-images/.gitea/workflows/docker-build.yml
Philipp Hofer 8c0dbfb6c9
Some checks failed
Build and Push Docker Images / build-rust-latest (push) Failing after 6s
push
2025-04-06 13:38:25 +02:00

49 lines
1.4 KiB
YAML

name: Build and Push Docker Images
on:
push:
branches: [ main, ci ]
paths:
- '*/Dockerfile'
- '.gitea/workflows/docker-build.yml'
jobs:
build-rust-latest:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Gitea Container Registry
uses: docker/login-action@v2
with:
registry: git.hofer.link
username: ${{ secrets.USERNAME_GITEA }}
password: ${{ secrets.PASSWORD_GITEA }}
- name: Build and push rust-latest
uses: docker/build-push-action@v4
with:
context: ./rust-latest
push: true
tags: git.hofer.link/philipp/ci-images:rust-latest
cache-from: type=registry,ref=git.hofer.link/philipp/ci-images:rust-latest-cache
cache-to: type=registry,ref=git.hofer.link/philipp/ci-images:rust-latest-cache,mode=max
# You can add more jobs for other Docker images
# Example:
# build-another-image:
# runs-on: ubuntu-latest
# steps:
# # Similar steps as above
# - name: Build and push another-image
# uses: docker/build-push-action@v4
# with:
# context: ./another-image-dir
# push: true
# tags: git.hofer.link/philipp/ci-images:another-image