mirror of
https://github.com/BoardWare-Genius/jarvis-models.git
synced 2025-12-13 16:53:24 +00:00
36 lines
882 B
YAML
36 lines
882 B
YAML
name: CI/CD Pipeline
|
|
|
|
on:
|
|
push:
|
|
branches: [ docker ]
|
|
# pull_request:
|
|
# branches: [ main ]
|
|
|
|
env:
|
|
VERSION: 0.0.1
|
|
REGISTRY: https://harbor.bwgdi.com
|
|
REGISTRY_NAME: harbor.bwgdi.com
|
|
IMAGE_NAME: jarvis-models
|
|
|
|
jobs:
|
|
build-docker:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.BWGDI_NAME }}
|
|
password: ${{ secrets.BWGDI_TOKEN }}
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v4
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
push: true
|
|
tags: ${{ env.REGISTRY_NAME }}/library/${{env.IMAGE_NAME}}:${{ env.VERSION }}
|