add RequestSSL (#3) #23
This file contains 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
name: Check if mediawiki-repos.yaml is sorted alphabetically | |
on: | |
push: | |
paths: | |
- .github/workflows/mediawiki-repos-sorting-check.yml | |
- mediawiki-repos.yaml | |
pull_request: | |
paths: | |
- .github/workflows/mediawiki-repos-sorting-check.yml | |
- mediawiki-repos.yaml | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install PyYAML | |
run: pip3 install pyyaml | |
- name: Run YAML Sorting Check | |
run: | | |
python3 -c ' | |
import yaml | |
def check_alphabetical_order(data): | |
keys = list(data.keys()) | |
out_of_order_keys = [keys[i] for i in range(1, len(keys)) if keys[i] < keys[i-1]] | |
return out_of_order_keys | |
with open("mediawiki-repos.yaml", "r") as file: | |
data = yaml.safe_load(file) | |
out_of_order = check_alphabetical_order(data) | |
if len(out_of_order) == 0: | |
print("Top-level keys in mediawiki-repos.yaml are sorted alphabetically.") | |
else: | |
print("Top-level keys in mediawiki-repos.yaml are not sorted alphabetically:") | |
for key in out_of_order: | |
print(key) | |
exit(1) | |
' | |
notify-irc: | |
needs: check | |
runs-on: ubuntu-latest | |
if: ${{ always() && github.repository_owner == 'miraheze' && ( github.ref == 'refs/heads/master' || github.event_name == 'pull_request' ) }} | |
steps: | |
- name: failed | |
uses: technote-space/workflow-conclusion-action@v3 | |
- uses: rectalogic/notify-irc@v2 | |
if: env.WORKFLOW_CONCLUSION == 'failure' | |
with: | |
channel: "#miraheze-sre" | |
server: "irc.libera.chat" | |
nickname: miraheze-github | |
message: ${{ github.repository }} - ${{ github.actor }} the build has errored. | |
sasl_password: ${{ secrets.IRC_MIRAHEZEBOTS }} |