[github_releases] Add automation (closes #34)

This script is using the GitHub CLI with the GraphQL API in order to retrieve releases. The reasons are:

- using 'gh release list' does not return all the releases
- using the API, directly or via GitHub CLI, is slow, produces a lot of 502 errors, and is harder due to pagination.
- using the GraphQL API directly is hard due to pagination.
- using a library, such as graphql-python, is sightly harder than using the GitHub CLI (and still requires a GITHUB_TOKEN).

Access to the GitHub token is required when using GitHub CLI, hence the update.yml workflow update.
This commit is contained in:
Marc Wrobel
2023-02-23 20:05:41 +01:00
parent ab81fa5aa3
commit adb7cbfdeb
2 changed files with 102 additions and 0 deletions

View File

@@ -63,6 +63,7 @@ jobs:
# Note that using we had to use /home/runner because using ~ does not work, despite what's
# explained in the https://github.com/actions/upload-artifact/tree/v2-preview#environment-variables-and-tilde-expansion.
PYPPETEER_HOME: /home/runner/.cache/pyppeteer
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: for i in src/*.py; do python $i;done
- name: Git and DockerHub Updates
run: bundle exec ruby update.rb ./website ~/.cache releases