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

33 lines
795 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 19:14:10 +03:00
runs-on: docker
2025-10-10 19:36:24 +03:00
container:
2025-10-10 19:39:21 +03:00
image: node:20-bullseye
2025-10-10 19:36:24 +03:00
options: --privileged -v /var/run/docker.sock:/var/run/docker.sock
2025-09-30 17:00:04 +03:00
steps:
- name: Checkout code
uses: actions/checkout@v4
- 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 .