-
-
Notifications
You must be signed in to change notification settings - Fork 800
96 lines (94 loc) · 2.94 KB
/
auto-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
88
89
90
91
92
93
94
95
96
name: autobuildallthemods
on:
push:
branches:
- master
- develop
- testing
paths:
- '**/docker-mods/**'
workflow_dispatch:
inputs:
app:
description: 'Select an app'
required: true
type: choice
options:
- radarr
- sonarr
- readarr
- lidarr
- bazarr
- whisparr
- prowlarr
- plex
- jellyfin
- emby
- sabnzbd
- synclounge
- transmission
- calibre-web
- lazylibrarian
- mylar3
- duplicati
- tautulli
- vuetorrent
- deluge
- jackett
- librespeed
- nzbget
- qbittorrent
- rutorrent
- swag
- thelounge
- build-all-the-mods
append-tag:
required: false
description: 'Append a the tag with "-custom" e.g :radarr-testing'
jobs:
push_to_ghcr_io:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USER }}
password: ${{ secrets.GH_PAT }}
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: build all on push
if: ${{ github.event_name == 'push' }}
run: |
branch=${{ steps.extract_branch.outputs.branch }}
if [ "$branch" = "master" ]; then
branch=""
else
branch="-$branch"
fi
for dir in docker-mods/*;
do
app="$( echo "$dir" | cut -d'/' -f2 -s )"
docker build docker-mods/$app --tag ghcr.io/${{ secrets.GHCR_USER }}/theme.park:$app$branch
docker push ghcr.io/${{ secrets.GHCR_USER }}/theme.park:$app$branch
done
- name: manually build
if: ${{ github.event.inputs.app && github.event.inputs.app != 'build-all-the-mods' }}
run: |
docker build docker-mods/${{ github.event.inputs.app }} --tag ghcr.io/${{ secrets.GHCR_USER }}/theme.park:${{ github.event.inputs.app }}${{ github.event.inputs.append-tag }}
docker push ghcr.io/${{ secrets.GHCR_USER }}/theme.park:${{ github.event.inputs.app }}${{ github.event.inputs.append-tag }}
- name: manually build all mods
if: ${{ github.event.inputs.app == 'build-all-the-mods' }}
run: |
for dir in docker-mods/*;
do
app="$( echo "$dir" | cut -d'/' -f2 -s )"
docker build docker-mods/$app --tag ghcr.io/${{ secrets.GHCR_USER }}/theme.park:$app${{ github.event.inputs.append-tag }}
docker push ghcr.io/${{ secrets.GHCR_USER }}/theme.park:$app${{ github.event.inputs.append-tag }}
done