File tree Expand file tree Collapse file tree 3 files changed +70
-1
lines changed
Expand file tree Collapse file tree 3 files changed +70
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ # Multiarch build file credits go to Lars Kellogg-Stedman at blog.oddbit.com. If You ever see this - thanks!
3+ name : ' build images'
4+
5+ on :
6+ push :
7+ branches :
8+ - master
9+
10+ jobs :
11+ docker :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout
15+ uses : actions/checkout@v2
16+
17+ - name : Prepare
18+ id : prep
19+ run : |
20+ DOCKER_IMAGE=${{ secrets.DOCKER_ORG }}/${GITHUB_REPOSITORY#*/}
21+ VERSION=$(cat VERSION)
22+ SHORTREF=${GITHUB_SHA::8}
23+
24+ TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}:latest,${DOCKER_IMAGE}:${SHORTREF}"
25+
26+ # Set output parameters.
27+ echo ::set-output name=tags::${TAGS}
28+ echo ::set-output name=docker_image::${DOCKER_IMAGE}
29+
30+ - name : Set up QEMU
31+ uses : docker/setup-qemu-action@master
32+ with :
33+ platforms : all
34+
35+ - name : Set up Docker Buildx
36+ id : buildx
37+ uses : docker/setup-buildx-action@master
38+
39+ - name : Login to DockerHub
40+ if : github.event_name != 'pull_request'
41+ uses : docker/login-action@v1
42+ with :
43+ username : ${{ secrets.DOCKER_USERNAME }}
44+ password : ${{ secrets.DOCKER_PASSWORD }}
45+
46+ - name : Build
47+ uses : docker/build-push-action@v2
48+ with :
49+ builder : ${{ steps.buildx.outputs.name }}
50+ context : .
51+ file : ./Dockerfile
52+ platforms : linux/amd64,linux/arm64
53+ push : true
54+ tags : ${{ steps.prep.outputs.tags }}
Original file line number Diff line number Diff line change 1+ # ###
2+ FROM golang:alpine AS builder
3+ RUN apk update && apk add --no-cache git make bash
4+ WORKDIR $GOPATH/src/csi-rclone-nodeplugin
5+ COPY . .
6+ RUN make plugin
7+
8+ # ###
9+ FROM alpine:3.9
10+ RUN apk add --no-cache ca-certificates bash fuse curl unzip
11+
12+ RUN curl https://rclone.org/install.sh | bash
13+
14+ COPY --from=builder /go/src/csi-rclone-nodeplugin/_output/csi-rclone-plugin /bin/csi-rclone-plugin
15+ ENTRYPOINT ["/bin/csi-rclone-plugin" ]
Original file line number Diff line number Diff line change 1- v1.2.8
1+ v1.2.9
You can’t perform that action at this time.
0 commit comments