Skip to content

Commit 6560ea9

Browse files
authored
build: fix docker plugin build - fixes rclone#8394
Signed-off-by: Anagh Kumar Baranwal <[email protected]>
1 parent cda82f3 commit 6560ea9

File tree

1 file changed

+38
-34
lines changed

1 file changed

+38
-34
lines changed

.github/workflows/build_publish_docker_plugin.yml

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,39 +7,43 @@ name: Release Build for Docker Plugin
77
on:
88
release:
99
types: [published]
10+
workflow_dispatch:
11+
inputs:
12+
manual:
13+
description: Manual run (bypass default conditions)
14+
type: boolean
15+
default: true
1016

1117
jobs:
12-
13-
build_docker_volume_plugin:
14-
if: github.repository == 'rclone/rclone'
15-
needs: build
16-
runs-on: ubuntu-latest
17-
name: Build docker plugin job
18-
steps:
19-
- name: Free some space
20-
shell: bash
21-
run: |
22-
df -h .
23-
# Remove android SDK
24-
sudo rm -rf /usr/local/lib/android || true
25-
# Remove .net runtime
26-
sudo rm -rf /usr/share/dotnet || true
27-
df -h .
28-
- name: Checkout master
29-
uses: actions/checkout@v4
30-
with:
31-
fetch-depth: 0
32-
- name: Build and publish docker plugin
33-
shell: bash
34-
run: |
35-
VER=${GITHUB_REF#refs/tags/}
36-
PLUGIN_USER=rclone
37-
docker login --username ${{ secrets.DOCKER_HUB_USER }} \
38-
--password-stdin <<< "${{ secrets.DOCKER_HUB_PASSWORD }}"
39-
for PLUGIN_ARCH in amd64 arm64 arm/v7 arm/v6 ;do
40-
export PLUGIN_USER PLUGIN_ARCH
41-
make docker-plugin PLUGIN_TAG=${PLUGIN_ARCH/\//-}
42-
make docker-plugin PLUGIN_TAG=${PLUGIN_ARCH/\//-}-${VER#v}
43-
done
44-
make docker-plugin PLUGIN_ARCH=amd64 PLUGIN_TAG=latest
45-
make docker-plugin PLUGIN_ARCH=amd64 PLUGIN_TAG=${VER#v}
18+
build_docker_volume_plugin:
19+
if: inputs.manual || github.repository == 'rclone/rclone'
20+
name: Build docker plugin job
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Free some space
24+
shell: bash
25+
run: |
26+
df -h .
27+
# Remove android SDK
28+
sudo rm -rf /usr/local/lib/android || true
29+
# Remove .net runtime
30+
sudo rm -rf /usr/share/dotnet || true
31+
df -h .
32+
- name: Checkout master
33+
uses: actions/checkout@v4
34+
with:
35+
fetch-depth: 0
36+
- name: Build and publish docker plugin
37+
shell: bash
38+
run: |
39+
VER=${GITHUB_REF#refs/tags/}
40+
PLUGIN_USER=rclone
41+
docker login --username ${{ secrets.DOCKER_HUB_USER }} \
42+
--password-stdin <<< "${{ secrets.DOCKER_HUB_PASSWORD }}"
43+
for PLUGIN_ARCH in amd64 arm64 arm/v7 arm/v6 ;do
44+
export PLUGIN_USER PLUGIN_ARCH
45+
make docker-plugin PLUGIN_TAG=${PLUGIN_ARCH/\//-}
46+
make docker-plugin PLUGIN_TAG=${PLUGIN_ARCH/\//-}-${VER#v}
47+
done
48+
make docker-plugin PLUGIN_ARCH=amd64 PLUGIN_TAG=latest
49+
make docker-plugin PLUGIN_ARCH=amd64 PLUGIN_TAG=${VER#v}

0 commit comments

Comments
 (0)