41 lines
967 B
YAML
41 lines
967 B
YAML
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: gentoo/pkgdev-docker
|
|
|
|
- name: Print token and actor
|
|
run: echo ${{github.actor}} && echo ${{secrets.GITEA_TOKEN}}
|
|
|
|
- name: Login to registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: git.ratigorsk-12.ru
|
|
username: ${{github.actor}}
|
|
password: ${{secrets.GITEA_TOKEN}}
|
|
|
|
- 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}}
|