Add publish workflow
All checks were successful
publish / build-and-publish (push) Successful in 16s
All checks were successful
publish / build-and-publish (push) Successful in 16s
This commit is contained in:
37
.gitea/workflows/publish.yaml
Normal file
37
.gitea/workflows/publish.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
name: publish
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
- name: Construct image metadata from commit
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: git.ratigorsk-12.ru/gentoo/pkgdev-docker
|
||||
|
||||
- name: Login to registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.ratigorsk-12.ru
|
||||
username: ${{vars.CONTAINER_REGISTRY_USER}}
|
||||
password: ${{secrets.CONTAINER_REGISTRY_PASSWORD}}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: ${{github.event_name != 'pull_request'}}
|
||||
tags: ${{steps.meta.outputs.tags}}
|
||||
labels: ${{steps.meta.outputs.labels}}
|
||||
Reference in New Issue
Block a user