I try to add a Jira ticket validation for our repository and decided to do it with Github actions.
I have an external bash script that I run in one step which sets the result if a Jira ticket is found to an environment variable.
I have another step which tried to access this environment variable and fail/success the flow by the result.
However, I can't seem to make it work, I don't see the new environment variable configured in the bash script.
Some code:
script.sh:
...
echo "jira_ticket_exists=false" >> "$GITHUB_ENV"
...
Github action step:
    - name: choose to reject or not
    id: jira_ticket_reject
    continue-on-error: true
    run: |
      env # searched for it also here - it doesn't exist.
      echo ${{ env.jira_ticket_exists }} # this returns nothing
      if [ ${{ env.jira_ticket_exists }} == "true" ]; then
        echo "Jira ticket found"
        exit 0
      else
        echo "Jira ticket not found"
        exit 1
      fi
Any ideas what I'm doing wrong?
thank you