From ab50c479ec965ae6260cd0b861bdfe6a567ace9e Mon Sep 17 00:00:00 2001 From: Steve LLamb <38917682+SteveLLamb@users.noreply.github.com> Date: Thu, 12 Mar 2026 10:45:48 -0700 Subject: [PATCH 1/2] add auto-update workflow and bump tooling submodule branch Adds update-tooling-submodule.yml to receive repository_dispatch events from SMPTE/html-pub releases and commit submodule updates directly to main. --- .../workflows/update-tooling-submodule.yml | 57 +++++++++++++++++++ tooling | 2 +- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/update-tooling-submodule.yml diff --git a/.github/workflows/update-tooling-submodule.yml b/.github/workflows/update-tooling-submodule.yml new file mode 100644 index 0000000..3f0c23a --- /dev/null +++ b/.github/workflows/update-tooling-submodule.yml @@ -0,0 +1,57 @@ +name: Update tooling submodule on new release + +on: + repository_dispatch: + types: [tooling-release] + +jobs: + update-submodule: + runs-on: ubuntu-latest + if: github.repository_owner == 'SMPTE' + + permissions: + contents: write + + steps: + - name: Checkout template repo with submodule + uses: actions/checkout@v3 + with: + token: ${{ secrets.SUBMODULE_UPDATE_PAT }} + submodules: true + fetch-depth: 0 + + - name: Check if submodule is already at this SHA + id: check + env: + TARGET_SHA: ${{ github.event.client_payload.sha }} + run: | + CURRENT_SHA=$(git -C tooling rev-parse HEAD) + echo "current_sha=${CURRENT_SHA}" >> "$GITHUB_OUTPUT" + if [[ "$CURRENT_SHA" == "$TARGET_SHA" ]]; then + echo "already_up_to_date=true" >> "$GITHUB_OUTPUT" + else + echo "already_up_to_date=false" >> "$GITHUB_OUTPUT" + fi + + - name: Update submodule to release SHA + if: steps.check.outputs.already_up_to_date != 'true' + env: + TARGET_SHA: ${{ github.event.client_payload.sha }} + run: | + git -C tooling fetch origin + git -C tooling checkout "$TARGET_SHA" + + - name: Commit and push to main + if: steps.check.outputs.already_up_to_date != 'true' + env: + TAG: ${{ github.event.client_payload.tag }} + TARGET_SHA: ${{ github.event.client_payload.sha }} + CURRENT_SHA: ${{ steps.check.outputs.current_sha }} + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add tooling + git commit -m "bump tooling to ${TAG} + + Updates tooling submodule from ${CURRENT_SHA} to ${TARGET_SHA}." + git push origin main diff --git a/tooling b/tooling index 07019b6..e1ea4fb 160000 --- a/tooling +++ b/tooling @@ -1 +1 @@ -Subproject commit 07019b6f61347c5a2db07b4f23a9dc82295b761e +Subproject commit e1ea4fb08f0b82514da34cdf0256d8a56da4ffa2 From 8c44625724b6153ce3a68ad5133d66816dee5dbe Mon Sep 17 00:00:00 2001 From: Steve LLamb <38917682+SteveLLamb@users.noreply.github.com> Date: Thu, 12 Mar 2026 10:49:37 -0700 Subject: [PATCH 2/2] sync main.yml with tooling to satisfy cmp assertion --- .github/workflows/main.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 71f7a29..d170982 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -66,3 +66,15 @@ jobs: AWS_S3_KEY_PREFIX: "${{env.REPOSITORY_NAME}}/" CANONICAL_LINK_PREFIX: ${{env.CANONICAL_LINK_PREFIX}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Notify template repo to update submodule + if: github.event_name == 'release' && github.repository == 'SMPTE/html-pub' + env: + GH_TOKEN: ${{ secrets.TEMPLATE_REPO_PAT }} + TAG_NAME: ${{ github.event.release.tag_name }} + run: | + gh api repos/SMPTE/html-pub-template/dispatches \ + --method POST \ + --field event_type=tooling-release \ + --field "client_payload[tag]=${TAG_NAME}" \ + --field "client_payload[sha]=${GITHUB_SHA}"