-
Notifications
You must be signed in to change notification settings - Fork 5
62 lines (53 loc) · 2.01 KB
/
mssqlbase.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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