Skip to content
Prev Previous commit
Enable telegram notification on other versions
Add version to the notification text
  • Loading branch information
rffontenelle committed Sep 3, 2024
commit f15a96aae224aec74d94754448096633591d9cae
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
GITHUB_RUN_ID: ${{ github.run_id }}

- name: Notify via Telegram
if: always() && steps.prepare.outcome == 'success' && github.event_name == 'schedule' && inputs.tx_project == 'python-newest'
if: always() && steps.prepare.outcome == 'success' && github.event_name == 'schedule'
uses: appleboy/telegram-action@v0.1.1
with:
to: ${{ secrets.TELEGRAM_TO }}
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
GITHUB_RUN_ID: ${{ github.run_id }}

- name: Notify via Telegram
if: always() && steps.prepare.outcome == 'success' && github.event_name == 'schedule' && inputs.tx_project == 'python-newest'
if: always() && steps.prepare.outcome == 'success' && github.event_name == 'schedule'
uses: appleboy/telegram-action@v0.1.1
with:
to: ${{ secrets.TELEGRAM_TO }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ on:
required: true

env:
PYDOC_VERSION: ${{ inputs.version }}
PYDOC_LANGUAGE: pt_BR
PYDOC_TX_PROJECT: ${{ inputs.tx_project }}
PYDOC_VERSION: ${{ inputs.version }}
TX_CLI_VERSION: '1.6.16'

jobs:
Expand Down
3 changes: 2 additions & 1 deletion scripts/prepmsg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ die() { echo "$0: error: $*" >&2; exit 1; }
[ $# -ne 2 ] && die "Expected 1 input and 1 output files, got $#"
[ ! -f "$1" ] && die "Input file $1 not found, skipping."
[ -z "${PYDOC_REPO}" ] && die "PYDOC_REPO is empty."
[ -z "${PYDOC_VERSION}" ] && die "PYDOC_VERSION is empty."
[ -z "${GITHUB_RUN_ID}" ] && die "GITHUB_RUN_ID is empty."
[ -z "${GITHUB_JOB}" ] && die "GITHUB_JOB is empty."

Expand Down Expand Up @@ -34,6 +35,6 @@ fi

[[ $(cat aux) == "" ]] && die "Unexpected empty output message."

echo "❌ *${GITHUB_JOB}* (ID [${GITHUB_RUN_ID}]($URL)):" > "$output";
echo "❌ *${PYDOC_VERSION} ${GITHUB_JOB}* (ID [${GITHUB_RUN_ID}]($URL)):" > "$output";
{ echo ""; cat aux; echo ""; } >> "$output"
rm aux