-
-
Notifications
You must be signed in to change notification settings - Fork 37
84 lines (71 loc) · 2.87 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: CI
on: [pull_request, push]
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.head_ref != '' }}
jobs:
build:
name: CI
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- "linux/amd64"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set platform name
id: set-platform-name
run: |
echo "PLATFORM_NAME=${{ matrix.platform }}" | sed 's|/|-|g' >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: ${{ matrix.platform }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
config-inline: |
[worker.oci]
max-parallelism = 1
- name: Build
uses: docker/build-push-action@v5
with:
build-args: |
QBT_VERSION=devel
load: true
platforms: ${{ matrix.platform }}
labels: |
org.opencontainers.image.description=An advanced BitTorrent client programmed in C++, based on Qt toolkit and libtorrent-rasterbar
org.opencontainers.image.documentation=https://github.com/qbittorrent/docker-qbittorrent-nox
org.opencontainers.image.licenses=GPL-3.0+
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.source=https://github.com/qbittorrent/docker-qbittorrent-nox
org.opencontainers.image.title=qbittorrent-nox docker image
org.opencontainers.image.url=https://github.com/qbittorrent/docker-qbittorrent-nox
org.opencontainers.image.vendor=qBittorrent
org.opencontainers.image.version=master
tags: |
qbittorrent-nox_${{ steps.set-platform-name.outputs.PLATFORM_NAME }}:devel
- name: Test run
run: |
docker run \
--entrypoint "/usr/bin/qbittorrent-nox" \
--platform ${{ matrix.platform }} \
qbittorrent-nox_${{ steps.set-platform-name.outputs.PLATFORM_NAME }}:devel \
--version
# To run the image locally:
# 1. `docker load < artifact`
# 2. remove `build` field and replace `image` field with the imported image in docker-compose.yml
# 3. `docker compose up`
- name: Export image
run: |
docker save \
--output qbittorrent-nox_devel_${{ steps.set-platform-name.outputs.PLATFORM_NAME }} \
qbittorrent-nox_${{ steps.set-platform-name.outputs.PLATFORM_NAME }}:devel
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: qbittorrent-nox_devel_${{ steps.set-platform-name.outputs.PLATFORM_NAME }}
path: qbittorrent-nox_devel_${{ steps.set-platform-name.outputs.PLATFORM_NAME }}