name: MSSQL on: push: branches: - master jobs: build-2022: name: Build MSSQL 2022 runs-on: ubuntu-latest timeout-minutes: 300 permissions: contents: read packages: write steps: - name: Checkout code uses: actions/checkout@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Log in to the Container registry uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v4 with: images: ghcr.io/aldy505/mssql-2022 flavor: | latest=true tags: | type=sha - name: Build and push Docker image uses: docker/build-push-action@v3 with: context: "{{defaultContext}}:mssql-2022" push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-2019: name: Build MSSQL 2019 runs-on: ubuntu-latest timeout-minutes: 300 permissions: contents: read packages: write steps: - name: Checkout code uses: actions/checkout@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - name: Log in to the Container registry uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta uses: docker/metadata-action@v4 with: images: ghcr.io/aldy505/mssql-2019 flavor: | latest=true tags: | type=sha - name: Build and push Docker image uses: docker/build-push-action@v3 with: context: "{{defaultContext}}:mssql-2019" push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}