Skip to content

test commit for preview ci #1965

test commit for preview ci

test commit for preview ci #1965

Workflow file for this run

name: Validate Submodule Commits
on:
pull_request:
branches:
- master
jobs:
submodule-commit-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Validate submodule commits
run: |
# Submodules are very easy to accidentally overwrite with old versions.
# To make submodule updates more explicit and to prevent accidental changes we check the revisions explicitly here.
# dfx 0.31.0-beta.0
LATEST_SDK="baae15c16633776eae8135f511932f1646018186"
# motoko docs 0.16.3
LATEST_MOTOKO="0d60c0f415c8f9330d881f551ef978fcf5afb353"
# Get current submodule commits
SDK_HASH=$(git submodule status submodules/sdk | awk '{print $1}')
MOTOKO_HASH=$(git submodule status submodules/motoko | awk '{print $1}')
# Validate SDK commit
if [[ "$SDK_HASH" != "$LATEST_SDK"* ]]; then
echo "Error: SDK submodule is not on the latest release commit"
exit 1
fi
# Validate Motoko commit
if [[ "$MOTOKO_HASH" != "$LATEST_MOTOKO"* ]]; then
echo "Error: Motoko submodule is not on the latest release commit"
exit 1
fi
echo "All submodules are on their latest release commits"