Files
wehub-resource-sync 461bf6fd40
CI / lint (3.11) (push) Blocked by required conditions
CI / lint (3.12) (push) Blocked by required conditions
CI / lint (3.13) (push) Blocked by required conditions
CI / shellcheck (push) Waiting to run
CI / shfmt (push) Waiting to run
CI / setup (3.11) (push) Waiting to run
CI / setup (3.12) (push) Waiting to run
CI / setup (3.13) (push) Waiting to run
CI / check-licenses (3.12) (push) Blocked by required conditions
CI / test_unit (3.11) (push) Blocked by required conditions
CI / test_unit (3.12) (push) Blocked by required conditions
CI / test_unit (3.13) (push) Blocked by required conditions
CI / test_unit_no_extras (3.11) (push) Blocked by required conditions
CI / test_unit_no_extras (3.12) (push) Blocked by required conditions
CI / test_json_to_html (3.12) (push) Blocked by required conditions
CI / test_unit_no_extras (3.13) (push) Blocked by required conditions
CI / test_unit_dependency_extras (csv, 3.11, --extra csv) (push) Blocked by required conditions
CI / test_unit_dependency_extras (csv, 3.12, --extra csv) (push) Blocked by required conditions
CI / test_unit_dependency_extras (csv, 3.13, --extra csv) (push) Blocked by required conditions
CI / test_unit_dependency_extras (docx, 3.11, --extra docx) (push) Blocked by required conditions
CI / test_unit_dependency_extras (docx, 3.12, --extra docx) (push) Blocked by required conditions
CI / test_unit_dependency_extras (docx, 3.13, --extra docx) (push) Blocked by required conditions
CI / test_unit_dependency_extras (markdown, 3.11, --extra md) (push) Blocked by required conditions
CI / test_unit_dependency_extras (markdown, 3.12, --extra md) (push) Blocked by required conditions
CI / test_unit_dependency_extras (markdown, 3.13, --extra md) (push) Blocked by required conditions
CI / test_unit_dependency_extras (odt, 3.11, --extra odt) (push) Blocked by required conditions
CI / test_unit_dependency_extras (odt, 3.12, --extra odt) (push) Blocked by required conditions
CI / test_unit_dependency_extras (pdf-image, 3.12, --extra pdf --extra image --extra paddleocr) (push) Blocked by required conditions
CI / test_unit_dependency_extras (pdf-image, 3.13, --extra pdf --extra image --extra paddleocr) (push) Blocked by required conditions
CI / test_unit_dependency_extras (pptx, 3.13, --extra pptx) (push) Blocked by required conditions
CI / test_unit_dependency_extras (odt, 3.13, --extra odt) (push) Blocked by required conditions
CI / test_unit_dependency_extras (pdf-image, 3.11, --extra pdf --extra image --extra paddleocr) (push) Blocked by required conditions
CI / test_unit_dependency_extras (pptx, 3.11, --extra pptx) (push) Blocked by required conditions
CI / test_unit_dependency_extras (pptx, 3.12, --extra pptx) (push) Blocked by required conditions
CI / test_unit_dependency_extras (pypandoc, 3.11, --extra epub --extra org --extra rtf --extra rst) (push) Blocked by required conditions
CI / test_unit_dependency_extras (pypandoc, 3.12, --extra epub --extra org --extra rtf --extra rst) (push) Blocked by required conditions
CI / test_unit_dependency_extras (pypandoc, 3.13, --extra epub --extra org --extra rtf --extra rst) (push) Blocked by required conditions
CI / test_unit_dependency_extras (xlsx, 3.11, --extra xlsx) (push) Blocked by required conditions
CI / test_unit_dependency_extras (xlsx, 3.12, --extra xlsx) (push) Blocked by required conditions
CI / test_unit_dependency_extras (xlsx, 3.13, --extra xlsx) (push) Blocked by required conditions
CI / test_ingest_src (3.12) (push) Blocked by required conditions
CI / test_json_to_markdown (3.12) (push) Blocked by required conditions
CI / changelog (push) Waiting to run
CI / test_dockerfile (push) Blocked by required conditions
CodeQL / Analyze (python) (push) Waiting to run
Build And Push Docker Image / set-short-sha (push) Waiting to run
Build And Push Docker Image / build-images (linux/amd64, opensource-linux-8core) (push) Blocked by required conditions
Build And Push Docker Image / build-images (linux/arm64, ubuntu-24.04-arm) (push) Blocked by required conditions
Build And Push Docker Image / publish-images (push) Blocked by required conditions
Partition Benchmark / setup (push) Waiting to run
Partition Benchmark / Measure and compare partition() runtime (push) Blocked by required conditions
chore: import upstream snapshot with attribution
2026-07-13 13:33:56 +08:00

84 lines
3.2 KiB
YAML

name: Release Version Alert
on:
pull_request:
types:
- opened
- synchronize
branches: [ main ]
jobs:
check-version:
runs-on: ubuntu-latest
steps:
- name: Checkout codes
uses: actions/checkout@v4
- name: Get PR information
id: pr-info
run: |
PR_NUMBER=$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")
HAS_PR=false; [ "$PR_NUMBER" != "null" ] && HAS_PR=true
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
echo "HAS_PR=$HAS_PR" >> $GITHUB_ENV
echo "PR_NUMBER=$PR_NUMBER"
echo "HAS_PR=$HAS_PR"
- name: Check versions
id: check-versions
run: |
CHECK_NEW_VERSION_RESPONSE=$(bash scripts/check-new-release-version.sh)
if [[ "$CHECK_NEW_VERSION_RESPONSE" == "New release version"* ]]; then
if [ "$HAS_PR" = true ]; then
MESSAGE="$CHECK_NEW_VERSION_RESPONSE :rocket: Coming soon in PR: https://github.com/$GITHUB_REPOSITORY/pull/$PR_NUMBER "
else
BRANCH_NAME=$(echo "${GITHUB_REF#refs/heads/}")
BRANCH_LINK="https://github.com/${{ github.repository }}/tree/$BRANCH_NAME"
MESSAGE="$CHECK_NEW_VERSION_RESPONSE :rocket: Coming soon in branch: $BRANCH_LINK"
fi
echo "SLACK_MESSAGE=$MESSAGE" >> $GITHUB_ENV
else
echo "No new non-dev version found. Skipping Slack notification."
echo "SKIP_STEPS=true" >> $GITHUB_ENV # Set an environment variable to indicate skipping steps
fi
echo "SLACK_MESSAGE=$MESSAGE"
- name: Generate Message Hash
if: env.SKIP_STEPS != 'true'
id: generate-hash
run: |
MESSAGE_HASH=$(echo "${{env.SLACK_MESSAGE}}" | sha256sum | cut -d ' ' -f1)
echo "MESSAGE_HASH=$MESSAGE_HASH" >> $GITHUB_ENV
- name: Restore Message from Cache
if: env.SKIP_STEPS != 'true'
id: restore-cache
uses: actions/cache/restore@v4
with:
path: message_cache.txt
key: message-cache-${{ env.MESSAGE_HASH }}
- name: Check for Duplicates
if: env.SKIP_STEPS != 'true'
run: |
DUPLICATE_CHECK=$(grep -Fx "${{env.SLACK_MESSAGE}}" message_cache.txt || true)
echo "DUPLICATE_CHECK=$DUPLICATE_CHECK"
if [ -n "$DUPLICATE_CHECK" ]; then
echo "Message already posted. Skipping duplicate Slack notification."
echo "SKIP_STEPS=true" >> $GITHUB_ENV # Set an environment variable to indicate skipping steps
fi
- name: Write Message to Cache File
if: env.SKIP_STEPS != 'true'
run: |
echo "${{env.SLACK_MESSAGE}}" >> message_cache.txt
cat message_cache.txt
- name: Store Message in Cache
if: env.SKIP_STEPS != 'true'
uses: actions/cache/save@v4
with:
path: message_cache.txt
key: message-cache-${{ env.MESSAGE_HASH }}
- name: Slack Notification
if: env.SKIP_STEPS != 'true'
uses: slackapi/slack-github-action@v1.24.0
with:
channel-id: 'C05S1QMKL5D'
slack-message: ${{ env.SLACK_MESSAGE }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}