Add Java automation
Fetch Java versions with their dates from https://www.java.com/releases/. This script is using a new dependency: requests-html (https://requests-html.kennethreitz.org/). This is because https://www.java.com/releases/ needs JavaScript to render correctly. And for this to work requests-html automatically downloads Chromium because of its dependency to pyppeteer. Chromium is downloaded into PYPPETEER_HOME, so the workflow has been modified to set this directory as a subdirectory of ~/.cache. Note that declaring the same environment variable from the python script does not work.
This commit is contained in:
5
.github/workflows/update.yml
vendored
5
.github/workflows/update.yml
vendored
@@ -58,6 +58,11 @@ jobs:
|
||||
git config --global extensions.partialClone true
|
||||
pip install -r requirements.txt
|
||||
- name: Custom Updates
|
||||
env:
|
||||
# Add chromium downloaded by pyppeteer to the cache. See java.py for more information.
|
||||
# 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
|
||||
run: for i in src/*.py; do python $i;done
|
||||
- name: Git and DockerHub Updates
|
||||
run: bundle exec ruby update.rb ./website ~/.cache releases
|
||||
|
||||
Reference in New Issue
Block a user