Harbor - SampleAI Backend - Build and push Docker images #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Harbor - SampleAI Backend - Build and push Docker images | |
on: | |
workflow_dispatch: | |
jobs: | |
build-push: | |
runs-on: arc-runner-wsl | |
steps: | |
- name: Get current timestamp | |
run: | | |
export LC_ALL=C | |
echo "TIMESTAMP=$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Publish Docker image to Harbor | |
uses: elgohr/Publish-Docker-Github-Action@v5 | |
with: | |
name: sample-ai-backend-staging | |
username: ${{ secrets.HARBOR_USERNAME }} | |
password: ${{ secrets.HARBOR_PASSWORD }} | |
registry: https://10.102.246.164:8443 | |
tags: ${{ env.TIMESTAMP }} | |
dockerfile: apps/sample-ai/backend/Dockerfile | |
context: apps/sample-ai/backend |