Skip to content

Deploy mssqlbase

Deploy mssqlbase #432

Workflow file for this run

name: Deploy mssqlbase
on:
workflow_dispatch:
# run each night
schedule:
- cron: "0 0 * * *"
jobs:
buildandpush:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2
# https://github.com/docker/setup-qemu-action#usage
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
# https://github.com/marketplace/actions/docker-setup-buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
# https://github.com/docker/login-action#docker-hub
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
# Can't be all in one step bc it uses
# two entirely different images
- name: Build ARM64 and push to Docker Hub
uses: docker/build-push-action@v2
with:
context: ./sqlinstance/arch/arm64
platforms: linux/arm64
push: true
tags: dbatools/mssqlbase:latest-arm64
- name: Build AMD64 and push to Docker Hub
uses: docker/build-push-action@v2
with:
context: ./sqlinstance/arch/amd64
platforms: linux/amd64
push: true
tags: dbatools/mssqlbase:latest-amd64
# because it's two builds, the manifest has
# to be created and pushed manually
- name: Create and push manifest
run: |
docker manifest create dbatools/mssqlbase:latest --amend dbatools/mssqlbase:latest-amd64 --amend dbatools/mssqlbase:latest-arm64
docker manifest push docker.io/dbatools/mssqlbase:latest --purge
- name: View manifest
run: docker manifest inspect docker.io/dbatools/mssqlbase:latest
- uses: gautamkrishnar/keepalive-workflow@v1
with:
commit_message: keepalive to prevent workflow deactivation
committer_username: github-actions[bot]
committer_email: github-actions[bot]@users.noreply.github.com