Scheduled verify release calendar #129
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Licensed to the Apache Software Foundation (ASF) under one | |
| # or more contributor license agreements. See the NOTICE file | |
| # distributed with this work for additional information | |
| # regarding copyright ownership. The ASF licenses this file | |
| # to you under the Apache License, Version 2.0 (the | |
| # "License"); you may not use this file except in compliance | |
| # with the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, | |
| # software distributed under the License is distributed on an | |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| # KIND, either express or implied. See the License for the | |
| # specific language governing permissions and limitations | |
| # under the License. | |
| # | |
| --- | |
| name: "Scheduled verify release calendar" | |
| on: # yamllint disable-line rule:truthy | |
| schedule: | |
| # Daily at 06:00 UTC | |
| - cron: '0 6 * * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| verify-release-calendar: | |
| name: "Verify release calendar" | |
| runs-on: ["ubuntu-22.04"] | |
| timeout-minutes: 10 | |
| steps: | |
| - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: "Install uv" | |
| # Extract uv version from uv.lock. The format is stable: the line | |
| # immediately after `name = "uv"` is `version = "<X.Y.Z>"`. | |
| run: | | |
| UV_VERSION=$(sed -n '/^name = "uv"$/{n;s/^version = "\(.*\)"$/\1/p;}' uv.lock) | |
| if [[ -z "${UV_VERSION}" ]]; then | |
| echo "Failed to extract uv version from uv.lock" >&2 | |
| exit 1 | |
| fi | |
| echo "Installing uv==${UV_VERSION}" | |
| pip install "uv==${UV_VERSION}" | |
| - name: "Verify release calendar" | |
| run: uv run dev/verify_release_calendar.py | |
| # yamllint disable rule:line-length | |
| - name: "Notify Slack on failure" | |
| if: failure() | |
| uses: slackapi/slack-github-action@dcb1066f776dd043e64d0e8ba94ca15cc7e1875d | |
| with: | |
| method: chat.postMessage | |
| token: ${{ secrets.SLACK_BOT_TOKEN }} | |
| payload: | | |
| channel: "release-management" | |
| text: >- | |
| :warning: Release calendar verification failed. | |
| See: | |
| ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| blocks: | |
| - type: section | |
| text: | |
| type: mrkdwn | |
| text: >- | |
| :warning: *Release calendar verification failed* | |
| The scheduled `verify_release_calendar.py` check | |
| failed. Please review and fix the mismatch between | |
| the Confluence release wiki and the Google | |
| Calendar entries. | |
| • <https://cwiki.apache.org/confluence/display/AIRFLOW/Release+Plan|Release Plan wiki> | |
| • <https://calendar.google.com/calendar/u/0?cid=Y19kZTIxNGU5MmRmM2I3NTk3NzljYjY1ZjNlNDllNTYyNzk2YzYxMjZlNzUwMGNmYTdlNTI0YmY3ODE4NmQ4YjVlQGdyb3VwLmNhbGVuZGFyLmdvb2dsZS5jb20|Release Calendar> | |
| • <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View failed run> |