Files
router-lists-ui/.gitea/workflows/docker-publish.yml
T
denozord 0d0ac2936a
Publish Docker image / build-and-push (push) Successful in 5m3s
CI: build v5 branch with Docker tags v5 only
Made-with: Cursor
2026-04-20 01:36:21 +07:00

82 lines
2.6 KiB
YAML

name: Publish Docker image
on:
push:
branches:
- main
- v4
- v5
- tabler
- v3
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: |
image=moby/buildkit:v0.12.0
- name: Log in to Gitea Registry
uses: docker/login-action@v3
with:
registry: git.shts.su
username: ${{ gitea.actor }}
password: ${{ secrets.ACTIONS_PAT }}
# Ветка v5: в реестр только теги v5 / v5-<sha> (без latest)
- name: Build and push Docker image (v5)
if: ${{ gitea.ref_name == 'v5' }}
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.fast
push: true
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
git.shts.su/${{ gitea.repository }}:v5
git.shts.su/${{ gitea.repository }}:v5-${{ gitea.sha }}
labels: |
org.opencontainers.image.title=RouterOS Manager
org.opencontainers.image.description=RouterOS Manager for domains and AS management
org.opencontainers.image.version=v5
org.opencontainers.image.revision=${{ gitea.sha }}
org.opencontainers.image.created=${{ gitea.event.head_commit.timestamp }}
build-args: |
BUILDKIT_INLINE_CACHE=1
- name: Build and push Docker image (main и прочие ветки)
if: ${{ gitea.ref_name != 'v5' }}
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.fast
push: true
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
git.shts.su/${{ gitea.repository }}:latest
git.shts.su/${{ gitea.repository }}:${{ gitea.sha }}
labels: |
org.opencontainers.image.title=RouterOS Manager
org.opencontainers.image.description=RouterOS Manager for domains and AS management
org.opencontainers.image.version=latest
org.opencontainers.image.revision=${{ gitea.sha }}
org.opencontainers.image.created=${{ gitea.event.head_commit.timestamp }}
build-args: |
BUILDKIT_INLINE_CACHE=1
- name: Trigger container update webhook
continue-on-error: true
run: |
curl -X POST -sS --fail "${{ secrets.portainer_webhook }}"