Skip to content

Merge pull request #117 from rweisse/docker_mpi #3

Merge pull request #117 from rweisse/docker_mpi

Merge pull request #117 from rweisse/docker_mpi #3

Workflow file for this run

name: Update All Propti Images
on:
workflow_dispatch:
push:
branches: [master]
paths:
- '**.py'
- '.dockerignore'
- 'docker/Dockerfile'
env:
ORG: firedynamics
IMAGE_NAME: propti
jobs:
trigger-updates:
runs-on: ubuntu-latest
permissions:
packages: read
actions: write
steps:
- name: Extract available docker image versions and trigger build
continue-on-error: true
run: |
REGEX=[0-9]+\.[0-9]+\.[0-9]+
VERSIONS=$(curl --silent "https://api.github.com/users/${{ env.ORG }}/packages/container/${{ env.IMAGE_NAME }}/versions" --stderr - \
--header "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" | \
grep -E "[[:space:]]+\"${REGEX}\"" | grep -oEi ${REGEX})
for VERSION in ${VERSIONS}; do
curl -L -X POST -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/${{ github.repository }}/actions/workflows/deploy.yaml/dispatches \
-d "{\"ref\":\"master\",\"inputs\": {\"tag\": \"${VERSION}\"}}"
done