diff options
author | George L. Albany <Megacake1234@gmail.com> | 2023-03-31 16:24:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-31 16:24:15 +0200 |
commit | a5b2bc18dd0f087c8f211c632fe8701b63670155 (patch) | |
tree | 62783f6a2f3d2866dcaf06ea2cbc1ea124460254 /.github/actions/openvic2-env | |
parent | 3384b21177a160f7192a2e4877eea3b29880bf4e (diff) | |
parent | c174ed6856cea2b0ee3fe0a719e8e351be9452c1 (diff) |
Merge pull request #80 from Spartan322/fix/workflow-wine-failure
Diffstat (limited to '.github/actions/openvic2-env')
-rw-r--r-- | .github/actions/openvic2-env/action.yml | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/.github/actions/openvic2-env/action.yml b/.github/actions/openvic2-env/action.yml index 245777d..8fea1b3 100644 --- a/.github/actions/openvic2-env/action.yml +++ b/.github/actions/openvic2-env/action.yml @@ -22,6 +22,12 @@ runs: } catch(error) { if (error.response.status != 404) throw error; const tagList = await github.rest.repos.listTags({owner: context.repo.owner, repo: context.repo.repo}); - core.exportVariable(tag_name, tagList.data[0].name); - core.exportVariable(release_name, tagList.data[0].name); + if (tagList.data.length == 0) { + core.warning("Could not list tags, this repo has no tags on it, setting tag_name and release_name environment variables to '<UserRepo-NoTag>' and '<UserRepo-NoRelease>', you can fetch tags with 'git fetch --tags' <remote-name>' and push tags with 'git push --tags"); + core.exportVariable(tag_name, `<${context.repo.owner}/${context.repo.repo}-NoTag>`); + core.exportVariable(release_name, `<${context.repo.owner}/${context.repo.repo}-NoRelease>`); + } else { + core.exportVariable(tag_name, tagList.data[0].name); + core.exportVariable(release_name, tagList.data[0].name); + } }
\ No newline at end of file |