Skip to content

Training ML Model and pushing it back to repository #26183

Answered by weide-zhou
amorenocb asked this question in Actions
Discussion options

You must be logged in to vote

Hi @amorenocb ,

Check on my side, i used PAT , and add parameter ‘persist-credentials: false’ to actions/checkout@v2 to successfully complete the push. Code sample as below:

name: tokenexpire
on: [push]

jobs:
job1:
runs-on: [ubuntu-latest]
steps:
- name: checkout 2nd
uses: actions/checkout@v2
with:
repository: weide-zhou/ticket19
token: ${{ secrets.PAT }}
path: ticket19
persist-credentials: false
- name: checkout 1st
uses: actions/checkout@v2
with:
persist-credentials: false
clean: false
- name: touch file
run: |
touch filetest1.txt
- name: sleep 1hour
run: |
sleep 1h
- name: Commit newly trained model
run: |
git config --local user.email "[email protected]"
git config --local user.name "…

Replies: 11 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants