44 lines
1.0 KiB
YAML
44 lines
1.0 KiB
YAML
name: release-image-gitea
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 0.*
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Extract Metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
tags: |
|
|
type=ref,event=branch
|
|
type=ref,event=tag
|
|
images: ${{ vars.REPOSITORY_HOST }}/${{ gitea.repository }}
|
|
|
|
- name: Log into Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ vars.REPOSITORY_HOST }}
|
|
username: ${{ gitea.actor }}
|
|
password: ${{ secrets.REPOSITORY_TOKEN }}
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build and Push Image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
file: ./Dockerfile
|