mod: сборка пакета происходит, только если будет запушекн новый тег с версией (v0.1.0, например)
This commit is contained in:
@@ -2,7 +2,9 @@ name: Build ETPGRF-site
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ['main']
|
||||
# Запускать только при создании тега, начинающегося с 'v' (например, v1.0.0)
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -17,6 +19,16 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
|
||||
# Генерируем метаданные (теги) для Docker
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: git.cube2.ru/${{ github.repository }}
|
||||
tags: |
|
||||
type=ref,event=tag
|
||||
type=raw,value=latest,enable=${{ github.ref_type == 'tag' }}
|
||||
|
||||
- name: Login to Gitea Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
@@ -28,6 +40,8 @@ jobs:
|
||||
uses: docker/build-push-action@v4
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64 # <-- ВОТ ЭТО
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: git.cube2.ru/${{ github.repository }}:latest
|
||||
# Используем теги, сгенерированные шагом meta (v1.0.0 и latest)
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
Reference in New Issue
Block a user