Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Source - https://stackoverflow.com/a/78380165
# Posted by Stefan, modified by community. See post 'Timeline' for change history
# Retrieved 2026-04-14, License - CC BY-SA 4.0

# Set update schedule for GitHub Actions

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
4 changes: 2 additions & 2 deletions .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
if: github.event.action != 'closed'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- name: apt install
uses: nick-invision/retry@v2.4.0
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
- name: Remove preview from gh-pages
run: |
BRANCH_NAME="${{ github.head_ref }}"
Expand Down
1 change: 1 addition & 0 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Creates docs/gsod19/repos-graph.html
Requires env `$GITHUB_API_TOKEN`
"""

from __future__ import print_function, division
import os
import sys
Expand Down
28 changes: 16 additions & 12 deletions show-gh-actions-logs.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
'''
"""
Script to show what happens after checking out the gh-pages branch in recent GH Actions
runs. Useful for seeing which jobs caused an unnecessary deploy.
'''
"""

from os.path import expanduser
import io
import zipfile
import requests

token = open(expanduser('~/.gh-token'), 'rt').read().strip()
headers = {"Accept": "application/vnd.github.v3+json",
"Authorization": f"token {token}"}
runs_resp = requests.get('https://api.github.com/repos/openworm/openworm_docs/actions/runs',
headers=headers).json()
runs = runs_resp['workflow_runs']
token = open(expanduser("~/.gh-token"), "rt").read().strip()
headers = {
"Accept": "application/vnd.github.v3+json",
"Authorization": f"token {token}",
}
runs_resp = requests.get(
"https://api.github.com/repos/openworm/openworm_docs/actions/runs", headers=headers
).json()
runs = runs_resp["workflow_runs"]
for run in runs:
run_id = run['id']
run_number = run['run_number']
logs_url = run['logs_url']
run_id = run["id"]
run_number = run["run_number"]
logs_url = run["logs_url"]
logs_resp = requests.get(logs_url, headers=headers)
logs_zip = io.BytesIO(logs_resp.content)
print(f"Run number: {run_number}")
with zipfile.ZipFile(logs_zip) as logs_zf:
with logs_zf.open('1_build.txt') as logs_txt:
with logs_zf.open("1_build.txt") as logs_txt:
do_print = False
for ln in logs_txt:
ln = ln.decode().strip()
Expand Down
Loading