continuous-integration-images/.github/workflows/mssql.yml

87 lines
2.1 KiB
YAML
Raw Permalink Normal View History

2024-11-22 06:26:58 +00:00
name: MSSQL
2024-11-22 06:26:36 +00:00
on:
push:
branches:
- master
jobs:
2024-11-22 06:44:12 +00:00
build-2022:
name: Build MSSQL 2022
2024-11-22 06:26:36 +00:00
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:
2024-11-22 06:44:12 +00:00
registry: ghcr.io
2024-11-22 06:26:36 +00:00
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
2024-11-22 06:44:12 +00:00
images: ghcr.io/aldy505/mssql-2022
2024-11-22 06:26:36 +00:00
flavor: |
latest=true
tags: |
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
2024-11-22 06:44:12 +00:00
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"
2024-11-22 06:26:36 +00:00
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}