From 4c83579670c1e9f624858290ae0f388497802aea Mon Sep 17 00:00:00 2001 From: Francisco Marques Date: Sun, 24 Mar 2024 16:52:35 +0000 Subject: [PATCH] update ci/cd --- .github/workflows/build-and-push.yaml | 8 ++++---- .github/workflows/trigger-build.yaml | 4 ++++ README.md | 15 +++++++++++---- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-and-push.yaml b/.github/workflows/build-and-push.yaml index db04b0a..20f3e42 100644 --- a/.github/workflows/build-and-push.yaml +++ b/.github/workflows/build-and-push.yaml @@ -74,7 +74,7 @@ jobs: - name: Docker metadata id: docker_metadata - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: | tofran/restic-rclone @@ -82,15 +82,15 @@ jobs: tags: | type=raw,value=${{ matrix.restic_version }}_${{ matrix.rclone_version }} flavor: | - latest=false + latest=${{ matrix.restic_version == 'latest' && matrix.rclone_version == 'latest'}} - name: Build and push id: docker_build - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: ./ file: ./Dockerfile platforms: ${{ env.TARGET_PLATFORMS }} tags: ${{ steps.docker_metadata.outputs.tags }} labels: ${{ steps.docker_metadata.outputs.labels }} - push: true + push: ${{ github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')}} diff --git a/.github/workflows/trigger-build.yaml b/.github/workflows/trigger-build.yaml index ee1712e..3bb8501 100644 --- a/.github/workflows/trigger-build.yaml +++ b/.github/workflows/trigger-build.yaml @@ -5,6 +5,10 @@ on: # Every monday at 10:00 UTC - cron: "0 10 * * 1" workflow_dispatch: + push: + branches: + - main + pull_request: jobs: get_versions: diff --git a/README.md b/README.md index 5df2f93..642b70a 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ [![Docker image size](https://img.shields.io/docker/image-size/tofran/restic-rclone?sort=date)][DockerHub] [![Docker pulls](https://img.shields.io/docker/pulls/tofran/restic-rclone)][DockerHub] -Always up-to-date minimal Alpine multi-arch images, with **Restic** and **Rclone** tagged for each version combination. +Always up-to-date minimal Alpine multi-arch images, with **Restic** and **Rclone** tagged for each +version combination. [tofran/restic-rclone @ Docker Hub][DockerHub] @@ -13,12 +14,18 @@ Always up-to-date minimal Alpine multi-arch images, with **Restic** and **Rclone ## Tags -Images are tagged with a combination of Restic and Rclone tags, in the format: `{RESTIC_TAG}_{RCLONE_TAG}`. +Images are tagged with a combination of Restic and Rclone tags, in the format: +`{RESTIC_TAG}_{RCLONE_TAG}`. -Example tags: `latest_latest`, `0.15.1_1.54.1`, `latest_1.54`. +Example tags: `latest_latest`, `0.16.0_1.64.0`, `latest_1.64.0`, `0.16.0_latest`. The latest 4 images from both upstreams are maintained. Image building is automatic, via [GitHub actions](https://github.com/tofran/restic-rclone-docker/actions). +## Architecture support + +Images are built for the following architectures: +`linux/386`, `linux/amd64`, `linux/arm`, `linux/arm64` + ## Usage ```sh @@ -31,7 +38,7 @@ $ docker pull ghcr.io/tofran/restic-rclone:0.15.1_1.61.1 $ docker run tofran/restic-rclone:0.15.1_1.61.1 -v # or $ docker run ghcr.io/tofran/restic-rclone:0.15.1_1.61.1 -v -restic 0.15.1 compiled with go1.19.5 on linux/amd64 +# > restic 0.15.1 compiled with go1.19.5 on linux/amd64 ``` `restic` is the default entrypoint.