Reputation: 19
I have being trying to work on scheduling auto-training of my model at specific time using GitHub Actions but after writing out the YAML file this is the outcome:
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/setup-node@v2, actions/setup-python@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
name: Update LSTM Model
on:
schedule:
- cron: "0 14-15 * * *"
jobs:
update_model:
runs-on: windows-latest
steps:
- name: Check Out Code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8' # Specify a Python version from the available list
- name: Install Dependencies
run: |
set -x
python -m venv .venv
. .venv/Scripts/activate
pip install -r requirements.txt
- name: Update Model
run: python update_model.py
- name: Commit and Push
run: |
git config user.email "[email protected]"
git config user.name "user-name"
git add .
git commit -m "Update LSTM Model"
git push
the files to be run are all available on the same GitHub repository as the workflow.
Upvotes: 0
Views: 575
Reputation: 4328
You need to update the action versions you are referencing in your workflow. The error is telling you exactly the problem, it just may not be obvious where/how to fix it.
Look at each dependent action:
https://github.com/actions/checkout, v2 was released March 2023, which is not that old, however it is using node12. This is why you are getting the error. source
This can be resolved by using the latest version which is v4. source
uses: actions/checkout@v4
Same issue as check, v2 is from March 2023, but uses node12. source This can be resolved by using the latest version which is v4. source
uses: actions/setup-node@v4
Note: My guess is you probably don't even need this step, it appears your code relies on python and you inadvertently attempted to use this action to fix the node 12 error. If this is the case you can just delete this entire step.
There is a pattern here... Use v4. source
uses: actions/setup-python@v4
Upvotes: 1