mirror of
https://github.com/gilbN/theme.park.git
synced 2024-11-20 01:52:32 +01:00
2f86f4a35b
* Build all mods on push
144 lines
5.0 KiB
YAML
144 lines
5.0 KiB
YAML
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/checkout@v3.1.0
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v2.1.0
|
|
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
|
|
|
|
push_to_dockerhub:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v3.1.0
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v2.1.0
|
|
with:
|
|
username: ${{ secrets.DH_USER }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- 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 ${{ secrets.DH_USER }}/theme.park:$app$branch
|
|
docker push ${{ secrets.DH_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 ${{ secrets.DH_USER }}/theme.park:${{ github.event.inputs.app }}${{ github.event.inputs.append-tag }}
|
|
docker push ${{ secrets.DH_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 ${{ secrets.DH_USER }}/theme.park:$app${{ github.event.inputs.append-tag }}
|
|
docker push ${{ secrets.DH_USER }}/theme.park:$app${{ github.event.inputs.append-tag }}
|
|
done
|