api/.forgejo/workflows/make-image.yml

41 lines
988 B
YAML
Raw Normal View History

2025-09-30 17:00:04 +03:00
on:
push:
tags:
- 'v[0-9]+*'
2025-10-09 17:28:41 +03:00
workflow_dispatch:
2025-09-30 17:00:04 +03:00
env:
2025-10-09 16:37:39 +03:00
IMAGE_NAME: mtv2-repo-app
2025-09-30 17:00:04 +03:00
jobs:
2025-10-09 18:51:34 +03:00
build-and-push:
2025-09-30 17:00:04 +03:00
name: Make image
2025-10-10 20:08:29 +03:00
runs-on: ubuntu-latest
2025-10-10 21:17:49 +03:00
2025-09-30 17:00:04 +03:00
steps:
- name: Checkout code
uses: actions/checkout@v4
2025-10-10 21:17:49 +03:00
- 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 }}
2025-09-30 17:00:04 +03:00
- 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 \
2025-10-08 18:30:31 +03:00
--tag repo.nqws.ru/merch-tracker/mtv2-repo-app:latest \
--tag repo.nqws.ru/merch-tracker/mtv2-repo-app:${{ env.VERSION }} \
2025-09-30 17:00:04 +03:00
--push .