Skip to content

Manual Release

Manual Release #11

---
name: "Manual Release"
concurrency:
group: container-release
cancel-in-progress: false
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.TOKEN }}
jobs:
generate-build-matrix:
name: Generate matrix for building images
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.determine-images.outputs.changes }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install tools
run: sudo apt-get install moreutils jo
- name: Determine images to build
id: determine-images
shell: bash
run: |
if [ "${{ inputs.app }}" = "ALL" ]; then
./.github/scripts/fetch.sh all
else
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 "changes=${output}" >> $GITHUB_OUTPUT
fi
images-build:
uses: kilip/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 }}"
secrets: inherit