mirror of
https://github.com/fastapi/fastapi.git
synced 2026-03-30 04:32:46 -04:00
♻ Update GitHub actions (#1746)
* 🐛 Fix Gitter notification, use development gitter room until next release * 🔥 Remove trigger docs preview step from build-docs workflow as it requires a more privileged token, so it's now triggered by the preview docs watcher * 🔊 Dump context when building to allow debugging how to refactor the Gitter bot
This commit is contained in:
committed by
GitHub
parent
0f54657377
commit
6ab2841dbb
@@ -3,14 +3,14 @@ import os
|
||||
|
||||
import requests
|
||||
|
||||
room_id = "5c9c9540d73408ce4fbc1403" # FastAPI
|
||||
# room_id = "5cc46398d73408ce4fbed233" # Gitter development
|
||||
# room_id = "5c9c9540d73408ce4fbc1403" # FastAPI
|
||||
room_id = "5cc46398d73408ce4fbed233" # Gitter development
|
||||
|
||||
gitter_token = os.getenv("GITTER_TOKEN")
|
||||
assert gitter_token
|
||||
github_token = os.getenv("GITHUB_TOKEN")
|
||||
assert github_token
|
||||
tag_name = os.getenv("TRAVIS_TAG")
|
||||
tag_name = os.getenv("TAG")
|
||||
assert tag_name
|
||||
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
#! /usr/bin/env bash
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
PR=${PR}
|
||||
|
||||
if [ -z "$PR" ]; then
|
||||
echo "Not a PR build, skip trigger docs preview"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
NAME=${NAME:?Variable not set}
|
||||
GITHUB_TOKEN=${GITHUB_TOKEN:?Variable not set}
|
||||
|
||||
curl -v \
|
||||
-X POST \
|
||||
-H "Authorization: token ${GITHUB_TOKEN}" \
|
||||
-H "Accept: application/vnd.github.v3+json" \
|
||||
https://api.github.com/repos/tiangolo/fastapi/actions/workflows/preview-docs.yml/dispatches \
|
||||
-d '{"ref":"master", "inputs": {"pr": "'"${PR}"'", "name": "'"${NAME}"'"}}'
|
||||
Reference in New Issue
Block a user