task-processor/.forgejo/workflows/make-image.yml
nquidox acfd7bf0f9
All checks were successful
/ Make image (push) Successful in 42s
action added
2025-10-13 20:58:12 +03:00

40 lines
988 B
YAML

on:
push:
tags:
- 'v[0-9]+*'
workflow_dispatch:
env:
IMAGE_NAME: mtv2-task-processor
jobs:
build-and-push:
name: Make image
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Forgejo
uses: docker/login-action@v3
with:
registry: repo.nqws.ru
username: ${{ secrets.MAINTAINER_USERNAME }}
password: ${{ secrets.MAINTAINER_TOKEN }}
- name: Extract version from tag
id: extract_version
run: |
VERSION=${GITHUB_REF#refs/tags/}
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Make image
run: |
docker buildx build --platform linux/amd64 \
--tag repo.nqws.ru/${{ github.repository }}:latest \
--tag repo.nqws.ru/${{ github.repository }}:${{ env.VERSION }} \
--push .