forked from mondediefr/docker-rutorrent
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (84 loc) · 2.38 KB
/
build.yml
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
85
86
87
name: build
on:
push:
branches:
- master
schedule:
- cron: '0 0 * * 0'
jobs:
latest:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: latest
-
name: Get date (YYYY.MM.dd)
id: fullDate
run: echo "::set-output name=fullDate::$(date +'%Y.%m.%d')"
-
name: Get date (YYYY.MM)
id: yearMonthDate
run: echo "::set-output name=yearMonthDate::$(date +'%Y.%m')"
-
name: Get date (YYYY)
id: yearDate
run: echo "::set-output name=yearDate::$(date +'%Y')"
-
name: Dockerhub login
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
-
name: Build
run: |
docker buildx build \
--pull \
--push \
--platform linux/amd64,linux/arm64 \
--tag ivanshift/rutorrent:latest \
--tag ivanshift/rutorrent:${{ steps.fullDate.outputs.fullDate }} \
--tag ivanshift/rutorrent:${{ steps.yearMonthDate.outputs.yearMonthDate }} \
--tag ivanshift/rutorrent:${{ steps.yearDate.outputs.yearDate }} .
filebot:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: latest
-
name: Dockerhub login
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin
-
name: Build
run: |
docker buildx build \
--pull \
--push \
--build-arg FILEBOT=true \
--platform linux/amd64,linux/arm64 \
--tag ivanshift/rutorrent:filebot .