Skip to content

2024-11-06 Custom DC stable release #4

2024-11-06 Custom DC stable release

2024-11-06 Custom DC stable release #4

name: all-commits-in-master
on:
pull_request:
branches: [ "customdc_stable" ]
jobs:
check_commits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for accurate comparison
- name: Check if commits exist in master
run: |
MASTER_BRANCH="master"
SOURCE_BRANCH=$(echo ${{ github.head_ref }})
git branch -a
# Get the list of commits in the source branch that are not in the master branch
MISSING_COMMITS=$(git log --pretty="%H" $MASTER_BRANCH..$SOURCE_BRANCH)
if [[ -n "$MISSING_COMMITS" ]]; then
echo "ERROR: The following commits are not present in $MASTER_BRANCH:"
echo "$MISSING_COMMITS"
exit 1
fi
echo "All commits are present in $MASTER_BRANCH"