Skip to content

Release: Manual

Release: Manual #262

---
name: "Release: Manual"
on:
workflow_dispatch:
inputs:
app:
description: "App (ex: radarr)"
default: ""
required: true
channels:
description: "Channels (ex: master,develop)"
default: ""
required: true
push:
description: "Push"
default: "false"
required: true
env:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
generate-build-matrix:
name: Generate matrix for building images
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.determine-images.outputs.images }}
steps:
- name: Install tools
run: |
sudo apt-get update
sudo apt-get -y install moreutils jo
- name: Determine images to build
id: determine-images
shell: bash
run: |
output="[]"
IFS=',' read -a channels <<< "${{ inputs.channels }}"
declare -a images_array=()
for channel in "${channels[@]}"; do
image="$(jo app="${{ inputs.app }}" channel="$channel")"
images_array+=($image)
done
output="$(jo -a ${images_array[*]})"
echo "::set-output name=images::${output}"
images-build:
uses: elfhosted/containers/.github/workflows/action-image-build.yaml@main
if: needs.generate-build-matrix.outputs.matrix != '[]'
needs:
- generate-build-matrix
with:
imagesToBuild: "${{ needs.generate-build-matrix.outputs.matrix }}"
pushImages: "${{ github.event.inputs.push }}"
updateMetadata: "${{ github.event.inputs.push }}"
sendNotification: "${{ github.event.inputs.push }}"
secrets: inherit