| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- name: qBittorrent
- on:
- push:
- paths:
- - 'qBittorrent/Dockerfile'
- - 'qBittorrent/Dockerfile.qb'
- - 'qBittorrent/Dockerfile.qbee'
- - 'qBittorrent/root/**'
- workflow_dispatch:
- jobs:
- job1:
- name: buildx tag
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: 'Set env'
- run: |
- echo "QBITTORRENT_VER=$(echo `grep -n "QBITTORRENT_VER=" qBittorrent/Dockerfile.qb`|awk -F= '{print $2}')" >> $GITHUB_ENV
- - name: Set up QEMU
- id: qemu
- uses: docker/setup-qemu-action@v3
- with:
- platforms: all
- - name: Set up Docker Buildx
- id: buildx
- uses: docker/setup-buildx-action@v3
- with:
- version: latest
- - name: Login to GHCR
- uses: docker/login-action@v3
- with:
- registry: ghcr.io
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
- - name: Check image exist
- id: qb-check-step
- run: |
- if [ `DOCKER_CLI_EXPERIMENTAL=enabled docker manifest inspect ghcr.io/gshang2017/qbittorrent-nox:${{ env.QBITTORRENT_VER }} > /dev/null 2>&1; echo $?` == "0" ];then echo "skipnext=true" >> $GITHUB_OUTPUT;fi
- - name: Build and push
- if : ( steps.qb-check-step.outputs.skipnext != 'true' )
- uses: docker/build-push-action@v6
- with:
- context: ./qBittorrent
- file: ./qBittorrent/Dockerfile.qb
- platforms: linux/amd64,linux/arm64,linux/arm/v7
- push: true
- tags: |
- ghcr.io/gshang2017/qbittorrent-nox:latest
- ghcr.io/gshang2017/qbittorrent-nox:${{ env.QBITTORRENT_VER }}
- job2:
- name: buildx tag
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: 'Set env'
- run: |
- echo "QBITTORRENT_EE_VER=$(echo `grep -n "QBITTORRENT_EE_VER=" qBittorrent/Dockerfile.qbee`|awk -F= '{print $2}')" >> $GITHUB_ENV
- - name: Set up QEMU
- id: qemu
- uses: docker/setup-qemu-action@v3
- with:
- platforms: all
- - name: Set up Docker Buildx
- id: buildx
- uses: docker/setup-buildx-action@v3
- with:
- version: latest
- - name: Login to GHCR
- uses: docker/login-action@v3
- with:
- registry: ghcr.io
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
- - name: Check image exist
- id: qbee-check-step
- run: |
- if [ `DOCKER_CLI_EXPERIMENTAL=enabled docker manifest inspect ghcr.io/gshang2017/qbittorrentee-nox:${{ env.QBITTORRENT_EE_VER }} > /dev/null 2>&1; echo $?` == "0" ];then echo "skipnext=true" >> $GITHUB_OUTPUT;fi
- - name: Build and push
- if : ( steps.qbee-check-step.outputs.skipnext != 'true' )
- uses: docker/build-push-action@v6
- with:
- context: ./qBittorrent
- file: ./qBittorrent/Dockerfile.qbee
- platforms: linux/amd64,linux/arm64,linux/arm/v7
- push: true
- tags: |
- ghcr.io/gshang2017/qbittorrentee-nox:latest
- ghcr.io/gshang2017/qbittorrentee-nox:${{ env.QBITTORRENT_EE_VER }}
- job3:
- needs: [job1, job2]
- name: buildx tag
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: 'Set env'
- run: |
- echo "QBITTORRENT_VER=$(echo `grep -n "QBITTORRENT_VER=" qBittorrent/Dockerfile.qb`|awk -F= '{print $2}')" >> $GITHUB_ENV
- echo "QBITTORRENT_EE_VER=$(echo `grep -n "QBITTORRENT_EE_VER=" qBittorrent/Dockerfile.qbee`|awk -F= '{print $2}')" >> $GITHUB_ENV
- - name: Set up QEMU
- id: qemu
- uses: docker/setup-qemu-action@v3
- with:
- platforms: all
- - name: Set up Docker Buildx
- id: buildx
- uses: docker/setup-buildx-action@v3
- with:
- version: latest
- - name: Login to DockerHub
- uses: docker/login-action@v3
- with:
- username: ${{ secrets.DOCKER_USERNAME }}
- password: ${{ secrets.DOCKER_PASSWORD }}
- - name: Login to GHCR
- uses: docker/login-action@v3
- with:
- registry: ghcr.io
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
- - name: Build and push
- uses: docker/build-push-action@v6
- with:
- context: ./qBittorrent
- file: ./qBittorrent/Dockerfile
- platforms: linux/amd64,linux/arm64,linux/arm/v7
- push: true
- tags: |
- johngong/qbittorrent:latest
- johngong/qbittorrent:${{ env.QBITTORRENT_VER }}-${{ env.QBITTORRENT_EE_VER }}
- ghcr.io/gshang2017/qbittorrent:latest
- ghcr.io/gshang2017/qbittorrent:${{ env.QBITTORRENT_VER }}-${{ env.QBITTORRENT_EE_VER }}
- - name: Docker Hub Description
- uses: peter-evans/dockerhub-description@v3
- with:
- username: ${{ secrets.DOCKER_USERNAME }}
- password: ${{ secrets.DOCKER_PASSWORD }}
- repository: johngong/qbittorrent
- short-description: qBittorrent:${{ env.QBITTORRENT_VER }},qBittorrent-EE:${{ env.QBITTORRENT_EE_VER }},集成Trackers更新
- readme-filepath: ./qBittorrent/README.md
|