It was definitely a mistake to use vars context in our GitHub Actions workflows. Now all values we're trying to get from vars are evaluated to empty strings (which of course is unexpected behavior) and everything works just by accident.
Actually vars context should be used to get variables which were set at the organization, repository, and environment levels. And everywhere we're using it, we don't really want to get these values from org, repo or environment. Now we don't have any org/repo/env variables, that's why all variables from vars are evaluated to empty string for us.
UPD
For develop branch at 93c4a6a:
I doublechecked this behaviour and it works - {{ vars.GITHUB_REF_NAME }} points to the current branch and {{ vars.GITHUB_REPOSITORY }} points to this repository correctly.
But there is no concrete words in GitHub Actions docs that vars context always will contain this variables. And vscode extension for GitHub Actions shows these warnings:
So we decided to use correct context github instead of vars to always be sure that it will work fine.
It was definitely a mistake to use
vars
context in our GitHub Actions workflows. Now all values we're trying to get fromvars
are evaluated to empty strings (which of course is unexpected behavior) and everything works just by accident.Actually
vars
context should be used to get variables which were set at the organization, repository, and environment levels. And everywhere we're using it, we don't really want to get these values from org, repo or environment. Now we don't have any org/repo/env variables, that's why all variables fromvars
are evaluated to empty string for us.UPD
For
develop
branch at 93c4a6a:I doublechecked this behaviour and it works -
{{ vars.GITHUB_REF_NAME }}
points to the current branch and{{ vars.GITHUB_REPOSITORY }}
points to this repository correctly.But there is no concrete words in GitHub Actions docs that
vars
context always will contain this variables. And vscode extension for GitHub Actions shows these warnings:So we decided to use correct context
github
instead ofvars
to always be sure that it will work fine.