From e01722cde708f2306a7023958d9c42ed05eebccd Mon Sep 17 00:00:00 2001 From: Martim Passos <49573683+martimpassos@users.noreply.github.com> Date: Fri, 5 Apr 2024 12:59:58 -0300 Subject: [PATCH] Run on submodule update --- .github/workflows/iiif.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/iiif.yaml b/.github/workflows/iiif.yaml index fff38d3b..dacc0da5 100644 --- a/.github/workflows/iiif.yaml +++ b/.github/workflows/iiif.yaml @@ -1,6 +1,8 @@ name: Build IIIF Manifests on: + repository_dispatch: + types: [submodule-update] workflow_dispatch: inputs: index: @@ -21,6 +23,22 @@ jobs: with: submodules: true + - name: Update submodule + run: | + cd data + git pull origin main + cd .. + git config --global user.name 'martimpassos' + git config --global user.email 'martimpassos@users.noreply.github.com' + git add data + if git diff --staged --quiet; then + echo "No changes detected, skipping commit." + exit 0 + else + git commit -am "Update submodule" + git push + fi + - name: Build Docker image run: docker build . -t etl