unsplash/comment-on-pr

Can environment variables be used in msg?

richardtapendium opened this issue · 1 comments

Is there a way to use environment variables in the msg?

jobs:
  post-url:
    name: Comment preview url on PR
    runs-on: ubuntu-latest
    steps:
      - name: comment PR
        uses: unsplash/comment-on-pr@master
        env:
          FIRST_NAME: Mona
          BRANCH_NAME: ${GITHUB_REF##*/}
          GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
        with:
          msg: The branch is ${{ env.BRANCH_NAME }} branch name.

Using env.FIRST_NAME works fine, but env.BRANCH_NAME doesn't.

Is there a way to make this work?

Any help is definitely appreciated.

All good, just realised I needed to do this instead:

with:
  msg: The branch is ${{ github.head_ref }} branch name.