Skip to content

Commit 10dc57d

Browse files
committed
Rclone v1.57.0 binary; Multistep image with builder; GA multiarch builds
1 parent c6b9d73 commit 10dc57d

File tree

3 files changed

+70
-1
lines changed

3 files changed

+70
-1
lines changed

.github/workflows/build_images.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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 }}

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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"]

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.2.8
1+
v1.2.9

0 commit comments

Comments
 (0)