41 lines
1018 B
YAML
41 lines
1018 B
YAML
name: Build and Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Login to Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: gitea.spilum.net
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build and Push (multi-arch)
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
push: true
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
build-args: |
|
|
BUILD_IDENTIFIER=${{ github.sha[0:5] }}
|
|
|
|
tags: |
|
|
gitea.spilum.net/spilum.net/mtf-nlp:${{ github.ref_name }}-${{ github.sha[0:5] }}
|
|
gitea.spilum.net/spilum.net/mtf-nlp:${{ github.ref_name }}-latest
|
|
|
|
- name: Log out from registry
|
|
if: always()
|
|
run: docker logout gitea.spilum.net
|