title: GitLab CI Templates - reference file/script local to the template
body: <p>Say I have a repo <code>ci-templates</code> with all my reused <code>gitlab-ci.yml</code> templates. I am trying to add a template that generates Release Notes based on the commits between tags. I generate the release notes with a bash script that lives in the <code>ci-templates</code> repo. The release job uses image <code>registry.gitlab.com/gitlab-org/release-cli</code> which uses <code>ash</code> by default but I can install <code>bash</code>, <code>git</code>, and a few other tools at the start.</p>
  <p>How can I add a bash script in the <code>ci-templates</code> repo that is pulled in and used during other other CI jobs when the templates is used via</p>
  <pre><code>include:
    - project: 'ci-templates'
      file: 'templates/release-notes.yml'
  </code></pre>
  <p>I tried writing the bash script into the yml file, but <code>script:</code> is not executed as bash. Would I have to manually call bash on every single line? Is there no cleaner way?</p>
  <p>I also tried using <code>$CI_JOB_TOKEN</code> and the files api to download the file from the repo and then run it via <code>bash script.sh</code> but this fails since the token does not have api permission to use the file api.</p>
  <p>At this point, trying to make this a generic template is more pain than its worth. I'd be more productive just copy pasting the script everywhere, but I'd like to avoid that for the sake of my team. Any ideas here? I think I understand the yaml important, but I have no idea how to reference anything that lives outside of the yaml.</p>