File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Image
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ example :
7
+ description : ' list of examples to publish (JSON)'
8
+ required : true
9
+ # keep in sync with default value of strategy matrix 'branch'
10
+ default : ' ["pi"]'
11
+
12
+ jobs :
13
+ publish-image :
14
+ if : ${{ startsWith(github.repository, 'apache/') }}
15
+ runs-on : ubuntu-latest
16
+ strategy :
17
+ fail-fast : false
18
+ matrix :
19
+ # keep in sync with default value of workflow_dispatch input 'branch'
20
+ example : ${{ fromJSON( inputs.branch || '["pi"]' ) }}
21
+ steps :
22
+ - name : Set up QEMU
23
+ uses : docker/setup-qemu-action@v3
24
+ - name : Set up Docker Buildx
25
+ uses : docker/setup-buildx-action@v3
26
+ - name : Login to Docker Hub
27
+ uses : docker/login-action@v3
28
+ with :
29
+ username : ${{ secrets.DOCKERHUB_USER }}
30
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
31
+ - name : Checkout repository
32
+ uses : actions/checkout@v4
33
+ with :
34
+ ref : main
35
+ - name : Build and push
36
+ uses : docker/build-push-action@v6
37
+ with :
38
+ # build cache on Github Actions, See: https://docs.docker.com/build/cache/backends/gha/#using-dockerbuild-push-action
39
+ cache-from : type=gha
40
+ cache-to : type=gha,mode=max
41
+ context : Examples/${{ matrix.branch }}
42
+ file : Examples/${{ matrix.branch }}/Dockerfile
43
+ platforms : linux/amd64,linux/arm64
44
+ push : true
45
+ tags : apache/spark-connect-swift:${{ matrix.example }}
You can’t perform that action at this time.
0 commit comments