Skip to content

Publish all docker images #324

Publish all docker images

Publish all docker images #324

Workflow file for this run

name: Publish all docker images
on:
workflow_dispatch:
schedule:
- cron: '26 5 * * *'
push:
branches: [ main ]
jobs:
trigger-workflow:
runs-on: ubuntu-latest
permissions:
actions: write
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: List folders
id: list-folders
run: |
echo "folders=$(ls -d */ | sed 's#/##g' | paste -sd ',')" >> $GITHUB_OUTPUT
- name: Trigger Docker Publish Workflow for each folder
run: |
IFS=', ' read -r -a folders <<< "${{ steps.list-folders.outputs.folders }}"
for folder in "${folders[@]}"; do
echo "Triggering Docker Publish Workflow for folder: $folder"
curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/actions/workflows/docker-publish.yml/dispatches \
-d '{"ref":"main", "inputs":{"version":"'$folder'"}}'
done