Skip to content

option_parser: fix unqualified calls to std::move (#59) #111

option_parser: fix unqualified calls to std::move (#59)

option_parser: fix unqualified calls to std::move (#59) #111

name: Publish rolling build
on:
push:
branches:
- master
jobs:
docker:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
arch: ["arm64", "amd64"]
include:
- arch: arm64
os: self-hosted-arm64
- arch: amd64
os: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Tag rolling release
run: |
cat BUILD.bazel | sed s/-jc+master/-jc+`date +%s`-`git rev-parse --short HEAD`/ | sed s/100master/`date +%s`.`git rev-parse --short HEAD`/ > BUILD.versioned
cat BUILD.versioned
mv BUILD.versioned BUILD.bazel
# - name: Set up QEMU
# run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Publish to Docker Hub
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/${{ matrix.arch }}
push: true
tags: |
jesec/rtorrent:master-${{ matrix.arch }}
- name: Extract built rTorrent artifacts from Docker image
run: |
docker buildx build --platform linux/${{ matrix.arch }} --target build -o type=tar . > ../out.tar
tar xvf ../out.tar root/rtorrent/dist
- name: Prepare distribution archive
run: |
mkdir dist-${{ matrix.arch }}
cp doc/rtorrent.rc doc/rtorrent@.service root/rtorrent/dist/rtorrent dist-${{ matrix.arch }}
- uses: actions/upload-artifact@v2
with:
name: rtorrent-linux-${{ matrix.arch }}
path: dist-${{ matrix.arch }}/*
- uses: actions/upload-artifact@v2
with:
name: rtorrent-deb-${{ matrix.arch }}
path: root/rtorrent/dist/rtorrent-deb.deb
- uses: actions/upload-artifact@v2
with:
name: rtorrent-rpm-${{ matrix.arch }}
path: root/rtorrent/dist/rtorrent-rpm.rpm
docker-manifest:
needs: docker
runs-on: ubuntu-20.04
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Merge multi-arch Docker image manifests
run: docker buildx imagetools create -t jesec/rtorrent:master jesec/rtorrent:master-arm64 jesec/rtorrent:master-amd64
- name: Remove intermediate tags
run: |
token=`curl -s -H "Content-Type: application/json" -X POST -d '{"username": "jesec","password":"${{ secrets.DOCKERHUB_PASSWORD }}"}' "https://hub.docker.com/v2/users/login/" | jq -r '.token'`
curl "https://hub.docker.com/v2/repositories/jesec/rtorrent/tags/master-arm64/" -X DELETE -H "Authorization: JWT ${token}"
curl "https://hub.docker.com/v2/repositories/jesec/rtorrent/tags/master-amd64/" -X DELETE -H "Authorization: JWT ${token}"