chromart-gitea-actions/.gitea/workflows/docker-publish-private.yaml
2024-12-12 19:10:25 -08:00

38 lines
860 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: Echo test
run: echo "${{ inputs.image_name }}"
- name: Checkout Code to Build
uses: actions/checkout@v4
with:
repository: ${{ inputs.repository }}
ref: ${{ inputs.ref }}
token: ${{ secrets.token }}
- name: Build Docker image
run: docker buildx build . -t 192.168.1.150:9120/${{ inputs.image_name }}:latest
- name: Push Docker Image
run: docker image push --all-tags 192.168.1.150:9120/${{ inputs.image_name }}