build: fix docker plugin build - fixes #8394

Signed-off-by: Anagh Kumar Baranwal <6824881+darthShadow@users.noreply.github.com>
This commit is contained in:
Anagh Kumar Baranwal 2025-02-15 19:53:43 +05:30 committed by GitHub
parent cda82f3d30
commit 6560ea9bdc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 38 additions and 34 deletions

View File

@ -7,39 +7,43 @@ name: Release Build for Docker Plugin
on: on:
release: release:
types: [published] types: [published]
workflow_dispatch:
inputs:
manual:
description: Manual run (bypass default conditions)
type: boolean
default: true
jobs: jobs:
build_docker_volume_plugin:
build_docker_volume_plugin: if: inputs.manual || github.repository == 'rclone/rclone'
if: github.repository == 'rclone/rclone' name: Build docker plugin job
needs: build runs-on: ubuntu-latest
runs-on: ubuntu-latest steps:
name: Build docker plugin job - name: Free some space
steps: shell: bash
- name: Free some space run: |
shell: bash df -h .
run: | # Remove android SDK
df -h . sudo rm -rf /usr/local/lib/android || true
# Remove android SDK # Remove .net runtime
sudo rm -rf /usr/local/lib/android || true sudo rm -rf /usr/share/dotnet || true
# Remove .net runtime df -h .
sudo rm -rf /usr/share/dotnet || true - name: Checkout master
df -h . uses: actions/checkout@v4
- name: Checkout master with:
uses: actions/checkout@v4 fetch-depth: 0
with: - name: Build and publish docker plugin
fetch-depth: 0 shell: bash
- name: Build and publish docker plugin run: |
shell: bash VER=${GITHUB_REF#refs/tags/}
run: | PLUGIN_USER=rclone
VER=${GITHUB_REF#refs/tags/} docker login --username ${{ secrets.DOCKER_HUB_USER }} \
PLUGIN_USER=rclone --password-stdin <<< "${{ secrets.DOCKER_HUB_PASSWORD }}"
docker login --username ${{ secrets.DOCKER_HUB_USER }} \ for PLUGIN_ARCH in amd64 arm64 arm/v7 arm/v6 ;do
--password-stdin <<< "${{ secrets.DOCKER_HUB_PASSWORD }}" export PLUGIN_USER PLUGIN_ARCH
for PLUGIN_ARCH in amd64 arm64 arm/v7 arm/v6 ;do make docker-plugin PLUGIN_TAG=${PLUGIN_ARCH/\//-}
export PLUGIN_USER PLUGIN_ARCH make docker-plugin PLUGIN_TAG=${PLUGIN_ARCH/\//-}-${VER#v}
make docker-plugin PLUGIN_TAG=${PLUGIN_ARCH/\//-} done
make docker-plugin PLUGIN_TAG=${PLUGIN_ARCH/\//-}-${VER#v} make docker-plugin PLUGIN_ARCH=amd64 PLUGIN_TAG=latest
done make docker-plugin PLUGIN_ARCH=amd64 PLUGIN_TAG=${VER#v}
make docker-plugin PLUGIN_ARCH=amd64 PLUGIN_TAG=latest
make docker-plugin PLUGIN_ARCH=amd64 PLUGIN_TAG=${VER#v}