From b42194f05676699544340aa41feed1bf33c13095 Mon Sep 17 00:00:00 2001 From: Adrien Ferrand Date: Fri, 27 Oct 2023 11:39:58 +0200 Subject: [PATCH] Working on release pipeline --- .github/workflows/main.yml | 3 --- .github/workflows/release.yml | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 172b92f..3318251 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -19,8 +19,6 @@ jobs: - name: Build container image run: | docker buildx create --use - VERSION=`cat VERSION` - echo "Docker tag is: ${VERSION}" docker buildx build --platform linux/amd64 --tag adferrand/backuppc --load . mkdir -p dist docker save adferrand/backuppc | gzip -c -1 > dist/docker-backuppc.tar.gz @@ -62,4 +60,3 @@ jobs: echo "Expect the backupp configuration page without errors" grep "The servers PID is" <(echo $output) docker rm -f backuppc-integration - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8fbb6e8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,24 @@ +name: release + +on: + push: + tags: ["4.*"] + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build, tag and push Docker multi-arch manifest to Docker Hub + run: | + docker run --rm --privileged multiarch/qemu-user-static --reset -p yes + docker buildx create --use + VERSION="$(cat VERSION)" + echo "Docker tag is: ${VERSION}" + docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --tag adferrand/backuppc:${VERSION} --tag adferrand/backuppc:4 --tag adferrand/backuppc --push .