-
Notifications
You must be signed in to change notification settings - Fork 897
65 lines (57 loc) · 1.67 KB
/
build_docker.yml
File metadata and controls
65 lines (57 loc) · 1.67 KB
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
63
64
65
name: build
on:
push:
branches:
- master
jobs:
windows_images:
name: docker images (windows)
runs-on: windows-latest
steps:
- name: Pull source
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build docker image
run: |
foreach ($image in "gorse-master", "gorse-server", "gorse-worker", "gorse-in-one") {
docker build -f cmd/$image/Dockerfile.windows `
-t zhenghaoz/${image}:nightly-windowsservercore .
docker image push --all-tags zhenghaoz/$image
}
docker_images:
name: docker images
runs-on: ubuntu-latest
strategy:
matrix:
targets: [default]
steps:
- name: Pull source
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-config-inline: |
[worker.oci]
max-parallelism = 1
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build docker image
uses: docker/bake-action@v6
with:
source: .
targets: ${{ matrix.targets }}
push: true
env:
AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}