39 lines
815 B
YAML
39 lines
815 B
YAML
on:
|
|
workflow_call:
|
|
inputs:
|
|
tag:
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
PACKAGE_REGISTRY_ACCESS:
|
|
required: true
|
|
|
|
|
|
name: Build and push docker image
|
|
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- uses: https://gitea.com/actions/checkout@v4
|
|
|
|
- name: Login to Docker Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: git.kluster.moll.re
|
|
username: ${{ gitea.repository_owner }}
|
|
password: ${{ secrets.PACKAGE_REGISTRY_ACCESS }}
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: backend
|
|
tags: git.kluster.moll.re/anydev/anyway-backend:${{ inputs.tag }}
|
|
push: true
|