I want to use the GITHUB_SHA with a variable, like this:
name: build
on: ["push"]
env:
PACKAGE: package-$GITHUB_SHA
But, when I use, yaml does not expand the variable and I got the string. How I can do it?
As part of an expression, you may access context information using one of two syntaxes.
Index syntax: github['sha']
Property dereference syntax: github.sha
In this case:
name: build
on: ["push"]
env:
PACKAGE: package-${{ github.sha }}
Try the following:
name: build
on: ["push"]
env:
PACKAGE: package-${{ github.sha }}
VM_NAME: ubuntu-env-${{ github.sha }} Update your answer, so I can give u kudosGITHUB_SHA is not defined in the context but rather in the environment