Publish all execution images #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Publish all execution images" | |
on: | |
workflow_run: | |
workflows: | |
- Publish base image | |
types: | |
- completed | |
env: | |
# Those workflows should not be triggered when a new base image has been rebuilt. | |
EXCLUDE_WORKFLOWS: "all.yml dependabot.yml phusion.yml" | |
GITHUB_TOKEN: ${{ secrets.OPENHPI_BOT_TOKEN }} | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Trigger other workflows | |
run: | | |
for workflow in .github/workflows/*.yml; do | |
if [[ ! " ${EXCLUDE_WORKFLOWS[@]} " =~ " $(basename $workflow) " ]]; then | |
echo "Triggering workflow run $(basename $workflow)" | |
gh workflow run $(basename $workflow) | |
fi | |
done |