32 lines
820 B
YAML
32 lines
820 B
YAML
name: Docker Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main' # Adjust to your default branch name
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to Gitea Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ gitea.server_url }}
|
|
username: ${{ gitea.actor }}
|
|
password: ${{ secrets.build_token }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: |
|
|
${{ gitea.server_url }}/${{ gitea.repository }}:latest
|
|
${{ gitea.server_url }}/${{ gitea.repository }}:${{ gitea.sha }} |