Skip to content

Commit 6ab2841

Browse files
authored
♻ Update GitHub actions (fastapi#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
1 parent 0f54657 commit 6ab2841

File tree

4 files changed

+9
-30
lines changed

4 files changed

+9
-30
lines changed

.github/workflows/build-docs.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ jobs:
2424
with:
2525
name: docs-zip-${{ github.sha }}
2626
path: ./docs.zip
27-
- name: Trigger Docs Preview
28-
env:
29-
PR: "${{ github.event.number }}"
30-
NAME: "docs-zip-${{ github.sha }}"
31-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
32-
run: bash ./scripts/trigger-docs-preview.sh
3327
- name: Deploy to Netlify
3428
uses: nwtgck/actions-netlify@v1.1.5
3529
with:

.github/workflows/publish.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,13 @@ jobs:
2323
FLIT_USERNAME: ${{ secrets.FLIT_USERNAME }}
2424
FLIT_PASSWORD: ${{ secrets.FLIT_PASSWORD }}
2525
run: bash scripts/publish.sh
26+
- name: Dump GitHub context
27+
env:
28+
GITHUB_CONTEXT: ${{ toJson(github) }}
29+
run: echo "$GITHUB_CONTEXT"
2630
- name: Notify
2731
env:
2832
GITTER_TOKEN: ${{ secrets.GITTER_TOKEN }}
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
TAG: ${{ github.ref }}
2935
run: bash scripts/notify.sh

scripts/gitter_releases_bot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33

44
import requests
55

6-
room_id = "5c9c9540d73408ce4fbc1403" # FastAPI
7-
# room_id = "5cc46398d73408ce4fbed233" # Gitter development
6+
# room_id = "5c9c9540d73408ce4fbc1403" # FastAPI
7+
room_id = "5cc46398d73408ce4fbed233" # Gitter development
88

99
gitter_token = os.getenv("GITTER_TOKEN")
1010
assert gitter_token
1111
github_token = os.getenv("GITHUB_TOKEN")
1212
assert github_token
13-
tag_name = os.getenv("TRAVIS_TAG")
13+
tag_name = os.getenv("TAG")
1414
assert tag_name
1515

1616

scripts/trigger-docs-preview.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)