From 14545eede8a5b7034a4a92dd91ad234fb544a2c5 Mon Sep 17 00:00:00 2001 From: GilbN Date: Sat, 3 Sep 2022 19:36:04 +0200 Subject: [PATCH] add build-all-mods action step --- .github/workflows/auto-build.yml | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/auto-build.yml b/.github/workflows/auto-build.yml index 1a7090c5..0248ae30 100644 --- a/.github/workflows/auto-build.yml +++ b/.github/workflows/auto-build.yml @@ -39,6 +39,7 @@ on: - rutorrent - swag - thelounge + - build-all-the-mods append-tag: required: false description: 'Append a the tag with "-custom" e.g :radarr-testing' @@ -77,10 +78,19 @@ jobs: docker push ghcr.io/gilbn/theme.park:$directory done - name: manually build - if: ${{ github.event.inputs.app }} + if: ${{ github.event.inputs.app != 'build-all-the-mods' }} run: | docker build docker-mods/${{ github.event.inputs.app }} --tag ghcr.io/gilbn/theme.park:${{ github.event.inputs.app }}${{ github.event.inputs.append-tag }} docker push ghcr.io/gilbn/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/gilbn/theme.park:$app${{ github.event.inputs.append-tag }} + docker push ghcr.io/gilbn/theme.park:$app${{ github.event.inputs.append-tag }} + done push_to_dockerhub: runs-on: ubuntu-latest steps: @@ -114,7 +124,16 @@ jobs: docker push gilbn/theme.park:$directory done - name: manually build - if: ${{ github.event.inputs.app }} + if: ${{ github.event.inputs.app != 'build-all-the-mods' }} run: | docker build docker-mods/${{ github.event.inputs.app }} --tag gilbn/theme.park:${{ github.event.inputs.app }}${{ github.event.inputs.append-tag }} - docker push gilbn/theme.park:${{ github.event.inputs.app }}${{ github.event.inputs.append-tag }} \ No newline at end of file + docker push gilbn/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 gilbn/theme.park:$app${{ github.event.inputs.append-tag }} + docker push gilbn/theme.park:$app${{ github.event.inputs.append-tag }} + done