Skip to content

Build Image for MSSQL #4

Build Image for MSSQL

Build Image for MSSQL #4

name: Build Image for MSSQL
on:
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
working-directory: internal/dbtest/mssql-docker
run: |
docker build -t ghcr.io/${{ github.repository_owner }}/mssql:latest .
# 推送镜像到 GHCR
- name: Push Docker image
run: |
docker push ghcr.io/${{ github.repository_owner }}/mssql:latest