chromart-gitea-actions/.gitea/workflows/docker-publish-private.yaml
2024-12-11 19:46:56 -08:00

39 lines
886 B
YAML

name: Docker Publish Private
on:
workflow_call:
inputs:
repository:
required: true
type: string
ref:
required: true
type: string
image_name:
required: true
type: string
secrets:
token:
required: true
jobs:
docker:
runs-on: ubuntu-22.04
steps:
- name: Checkout Code to Build
uses: actions/checkout@v4
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
token: ${{ secrets.token }}
- name: Build Docker image
env:
IMAGE_NAME: ${{ inputs.image_name }}
run: docker buildx build . -t 192.168.1.150:9120/$IMAGE_NAME:latest
- name: Push Docker Image
env:
IMAGE_NAME: ${{ inputs.image_name }}
run: docker image push --all-tags 192.168.1.150:9120/$IMAGE_NAME