JasonEtco / create-an-issue

A GitHub Action for creating a new issue from a template file.
MIT License
258 stars 83 forks source link

Template file cannot be found in my project's workspace #169

Closed colin-oos closed 9 months ago

colin-oos commented 9 months ago

I am getting the following error:

image

My template file is located at .github/downstream-conflict-issue-template.md and has the following contents:

---
title: Resolve PR for tenant {{ env.TENANT }}
labels: downstream conflict
---
There was a merge conflict when updating the downstream repository at http://github.com/{{ env.TENANT }}/{{ env.REPO }}

A [pull request]({{ env.PR_URL }}) was subsequently created which must be resolved at {{ env.PR_URL }}

I am using this step like this:

- name: Create Issue for ${{ steps.script.outputs.pr_url }}
        if: ${{ steps.script.outputs.has_pr == 'true' }}
        uses: JasonEtco/create-an-issue@v2
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          PR_URL: ${{ steps.script.outputs.pr_url }}
          TENANT: ${{ matrix.tenant }}
          REPO: ${{ env.INPUT_REPO }}
          STAGE: ${{ env.STAGE }}
        with:
          assignees: colin-oos
          filename: .github/downstream-conflict-issue-template.md

What am I missing?

colin-oos commented 9 months ago

Nevermind, my issue was that I had a script earlier in my job that modified the repository on the build server. I needed to re-run the checkout step to refresh my repo with the correct files including my template file