push docker private

This commit is contained in:
Martin Dimitrov 2024-12-11 19:32:30 -08:00
parent f11b2746e1
commit d3ecc6ae41

View File

@ -0,0 +1,34 @@
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
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 }}