2020-06-01 10:27:26 +00:00
|
|
|
name: Docker beta build
|
2020-05-28 07:22:17 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
jobs:
|
|
|
|
build:
|
2021-04-26 16:52:03 +00:00
|
|
|
if: github.repository == 'rclone/rclone'
|
2020-05-28 07:22:17 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Build image job
|
|
|
|
steps:
|
|
|
|
- name: Checkout master
|
2022-09-19 18:51:07 +00:00
|
|
|
uses: actions/checkout@v3
|
2020-06-01 10:27:26 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2023-03-17 11:54:01 +00:00
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Extract metadata (tags, labels) for Docker
|
|
|
|
id: meta
|
|
|
|
uses: docker/metadata-action@v4
|
|
|
|
with:
|
|
|
|
images: ghcr.io/${{ github.repository }}
|
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Login to GitHub Container Registry
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
# This is the user that triggered the Workflow. In this case, it will
|
|
|
|
# either be the user whom created the Release or manually triggered
|
|
|
|
# the workflow_dispatch.
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
# `secrets.GITHUB_TOKEN` is a secret that's automatically generated by
|
|
|
|
# GitHub Actions at the start of a workflow run to identify the job.
|
|
|
|
# This is used to authenticate against GitHub Container Registry.
|
|
|
|
# See https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
|
|
|
|
# for more detailed information.
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
2020-05-28 07:22:17 +00:00
|
|
|
- name: Build and publish image
|
2023-03-20 11:55:25 +00:00
|
|
|
uses: docker/build-push-action@v4
|
2020-05-28 07:22:17 +00:00
|
|
|
with:
|
2023-03-20 11:54:31 +00:00
|
|
|
file: Dockerfile
|
2023-03-17 11:54:01 +00:00
|
|
|
context: .
|
|
|
|
push: true # push the image to ghcr
|
|
|
|
tags: |
|
|
|
|
ghcr.io/rclone/rclone:beta
|
|
|
|
rclone/rclone:beta
|
|
|
|
labels: ${{ steps.meta.outputs.labels }}
|
2023-03-21 16:25:46 +00:00
|
|
|
platforms: linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6
|
2023-03-17 11:54:01 +00:00
|
|
|
cache-from: type=gha
|
|
|
|
cache-to: type=gha,mode=max
|
2023-03-20 18:09:54 +00:00
|
|
|
provenance: false
|
2023-03-17 11:54:01 +00:00
|
|
|
# Eventually cache will need to be cleared if builds more frequent than once a week
|
|
|
|
# https://github.com/docker/build-push-action/issues/252
|