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

41 lines
1,023 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:
docker:
name: Make image
2025-10-09 18:47:21 +03:00
runs-on: ubuntu-latest:docker://ghcr.io/catthehacker/ubuntu:act-latest
2025-09-30 17:00:04 +03:00
steps:
2025-10-09 17:44:06 +03:00
- name: Login to Forgejo
uses: docker/login-action@v3
with:
2025-10-09 18:26:51 +03:00
registry: repo.nqws.ru
2025-10-09 17:44:06 +03:00
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
2025-09-30 17:00:04 +03:00
- name: Checkout code
uses: actions/checkout@v4
2025-10-09 17:20:32 +03:00
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
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 .