Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

DP-3020 - Lab 2 - Configure and Deploy CI/CD Pipelines - Issue

未关闭 适合新手
#27 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
62/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
azure, github-actions, sql
领域
ci-cd, cloud, databases

调研方向

从 LAB02 Step 3 及其 main.yml workflow 开始,将所指导的部署与 issue 中所示的已编辑 workflow 进行比较。针对 Azure SQL Database 项目运行该 workflow,并确认 DotNet 失败已消失,且构建会生成并部署 DACPAC。

由索引模型根据 Issue 内容生成。

描述

LAB02 (CSS): Configure and deploy CI/CD pipelines for Azure SQL Database projects
Task: Create a GitHub Actions workflow
Step. 3: Copy the code below on your main.yml file. The code includes the steps for building and deploying your database project.

User have reported running the deployment with the Main.yml file as instructed fails with a DotNet failure [P1]. I have confirmed this behavior and have been able to bypass the issue using the following edited code in the Main.yml file [P2]:

name: Build and Deploy SQL Database Project

on:
  push:
    branches:
      - main

jobs:
  build:
    permissions:
      contents: read
      id-token: write

    runs-on: windows-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      # Install MSBuild (required for .sqlproj)
      - name: Setup MSBuild
        uses: microsoft/setup-msbuild@v2

      # Install sqlpackage (Windows version)
      - name: Install sqlpackage
        run: |
          dotnet tool install -g microsoft.sqlpackage

      - name: Login to Azure
        uses: azure/login@v1
        with:
          creds: ${{ secrets.AZURE_CREDENTIALS }}

      # Build SQL Project using MSBuild
      - name: Build SQL Project
        run: |
          msbuild .\MyDBProj\MyDBProj.sqlproj /p:Configuration=Release

      # Publish DACPAC to Azure SQL
      - name: Deploy DACPAC
        run: |
          sqlpackage /Action:Publish `
            /SourceFile:".\MyDBProj\bin\Release\MyDBProj.dacpac" `
            /TargetConnectionString:"${{ secrets.AZURE_CONN_STRING }}" `
            /p:DropObjectsNotInSource=true

[P1] - Deployment with the code as instructed

Image

[P2] - Deployment with edited code above

Image
主要语言
没有语言数据
星标
5
派生
13
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

MicrosoftLearning/mslearn-sql-dev 的其他 Issue

查看 MicrosoftLearning/mslearn-sql-dev 的全部 Issue

相似的 Issue

更多 DevOps Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。