-
Notifications
You must be signed in to change notification settings - Fork 3
75 lines (73 loc) · 1.95 KB
/
main.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
63
64
65
66
67
68
69
70
71
72
73
74
75
name: CI to Docker Hub
on:
schedule:
- cron: '0 0 * * 6'
push:
branches:
- main
jobs:
build_dist:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Cache Buildx layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: buildx-${{ runner.os }}-${{ github.sha }}
restore-keys: |
buildx-${{ runner.os }}
-
name: Build Hadoop dist
run: make hadoop-dist.iid cache=/tmp/.buildx-cache
-
name: Upload Dist
uses: actions/upload-artifact@v4
with:
name: hadoop-dist
path: /tmp/.buildx-cache
if-no-files-found: error
build_images:
needs: [build_dist]
runs-on: ubuntu-latest
strategy:
matrix:
java_version: [8, 11]
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Download Dist
uses: actions/download-artifact@v3
with:
name: hadoop-dist
path: /tmp/.buildx-cache
-
name: Build sandbox images
run: make all java_version=${{ matrix.java_version }} docker_org=${{ secrets.DOCKERHUB_USERNAME }} cache=/tmp/.buildx-cache
-
name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Push images
id: push_images
run: make push java_version=${{ matrix.java_version }} docker_org=${{ secrets.DOCKERHUB_USERNAME }} cache=/tmp/.buildx-cache