diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ce4ba40bc..43b5a67e1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,10 +62,10 @@ jobs: --health-cmd="mariadb-admin ping" --health-interval=10s --health-timeout=5s --health-retries=5 mssql2019: - image: mcmoe/mssqldocker:v2019.CU4.0 + image: ghcr.io/uptrace/mssql:latest env: ACCEPT_EULA: Y - SA_PASSWORD: passWORD1 + MYSQL_SA_PASSWORD: passWORD1 MSSQL_DB: test MSSQL_USER: sa MSSQL_PASSWORD: passWORD1 diff --git a/.github/workflows/mssql-container.yml b/.github/workflows/mssql-container.yml new file mode 100644 index 000000000..3dc172c2e --- /dev/null +++ b/.github/workflows/mssql-container.yml @@ -0,0 +1,29 @@ +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