Skip to content

Commit

Permalink
Update auto-nightly.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ale5000-git authored Jan 21, 2025
1 parent daa05a7 commit 94cf267
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/auto-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,14 @@ jobs:
with:
retries: 3
script: |
github.rest.git.updateRef({
await github.rest.git.updateRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/nightly',
sha: context.sha
}).catch(error => {
console.log('Error message: ' + error.message)
console.log('Error message: ' + error.status)
return
if(error.status == 422 && error.message == 'Reference already exists') {
console.log('::warning::Tag already exist, ignored!!!')
return
throw error
}
github.rest.git.createRef({
if(error.status !== 422 || error.message !== 'Reference does not exist') throw error
await github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/nightly',
Expand Down

0 comments on commit 94cf267

Please sign in to comment.