2020-06-01 12:27:26 +02:00
|
|
|
name: Docker release build
|
|
|
|
|
2020-05-28 09:22:17 +02:00
|
|
|
on:
|
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2021-04-26 18:52:03 +02:00
|
|
|
if: github.repository == 'rclone/rclone'
|
2020-05-28 09:22:17 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Build image job
|
|
|
|
steps:
|
|
|
|
- name: Checkout master
|
2022-09-19 20:51:07 +02:00
|
|
|
uses: actions/checkout@v3
|
2020-06-01 12:27:26 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2020-05-28 09:22:17 +02:00
|
|
|
- name: Get actual patch version
|
|
|
|
id: actual_patch_version
|
|
|
|
run: echo ::set-output name=ACTUAL_PATCH_VERSION::$(echo $GITHUB_REF | cut -d / -f 3 | sed 's/v//g')
|
|
|
|
- name: Get actual minor version
|
|
|
|
id: actual_minor_version
|
|
|
|
run: echo ::set-output name=ACTUAL_MINOR_VERSION::$(echo $GITHUB_REF | cut -d / -f 3 | sed 's/v//g' | cut -d "." -f 1,2)
|
|
|
|
- name: Get actual major version
|
|
|
|
id: actual_major_version
|
|
|
|
run: echo ::set-output name=ACTUAL_MAJOR_VERSION::$(echo $GITHUB_REF | cut -d / -f 3 | sed 's/v//g' | cut -d "." -f 1)
|
|
|
|
- name: Build and publish image
|
2020-12-06 12:43:34 +01:00
|
|
|
uses: ilteoood/docker_buildx@1.1.0
|
2020-05-28 09:22:17 +02:00
|
|
|
with:
|
|
|
|
tag: latest,${{ steps.actual_patch_version.outputs.ACTUAL_PATCH_VERSION }},${{ steps.actual_minor_version.outputs.ACTUAL_MINOR_VERSION }},${{ steps.actual_major_version.outputs.ACTUAL_MAJOR_VERSION }}
|
|
|
|
imageName: rclone/rclone
|
2022-05-23 19:04:03 +02:00
|
|
|
platform: linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6
|
2020-05-28 09:22:17 +02:00
|
|
|
publish: true
|
|
|
|
dockerHubUser: ${{ secrets.DOCKER_HUB_USER }}
|
|
|
|
dockerHubPassword: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
2021-05-26 11:43:50 +02:00
|
|
|
|
|
|
|
build_docker_volume_plugin:
|
|
|
|
if: github.repository == 'rclone/rclone'
|
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
2021-07-16 00:35:54 +02:00
|
|
|
name: Build docker plugin job
|
2021-05-26 11:43:50 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout master
|
2022-09-19 20:51:07 +02:00
|
|
|
uses: actions/checkout@v3
|
2021-05-26 11:43:50 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2021-07-16 00:35:54 +02:00
|
|
|
- name: Build and publish docker plugin
|
2021-05-26 11:43:50 +02:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2021-07-16 00:35:54 +02:00
|
|
|
VER=${GITHUB_REF#refs/tags/}
|
|
|
|
PLUGIN_USER=rclone
|
|
|
|
docker login --username ${{ secrets.DOCKER_HUB_USER }} \
|
|
|
|
--password-stdin <<< "${{ secrets.DOCKER_HUB_PASSWORD }}"
|
2022-05-23 19:04:03 +02:00
|
|
|
for PLUGIN_ARCH in amd64 arm64 arm/v7 arm/v6 ;do
|
2021-07-16 00:35:54 +02:00
|
|
|
export PLUGIN_USER PLUGIN_ARCH
|
|
|
|
make docker-plugin PLUGIN_TAG=${PLUGIN_ARCH/\//-}
|
|
|
|
make docker-plugin PLUGIN_TAG=${PLUGIN_ARCH/\//-}-${VER#v}
|
|
|
|
done
|
|
|
|
make docker-plugin PLUGIN_ARCH=amd64 PLUGIN_TAG=latest
|
|
|
|
make docker-plugin PLUGIN_ARCH=amd64 PLUGIN_TAG=${VER#v}
|