willmcgugan / faqtory

A tool to generate FAQ.md documents and automatically suggest answers to issues
MIT License
216 stars 20 forks source link

Simplify workflow by using $GITHUB_OUTPUT environment file #13

Open vberlier opened 1 year ago

vberlier commented 1 year ago

Currently the example workflow uses read-file-action to expose the suggestion to the step that creates the comment. However GitHub actions can do this natively using the $GITHUB_OUTPUT environment file https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter

- name: Run Suggest
  id: suggest
  run: |
    echo 'content<<EOF' >> $GITHUB_OUTPUT
    faqtory suggest "${{ github.event.issue.title }}" >> $GITHUB_OUTPUT
    echo 'EOF' >> $GITHUB_OUTPUT

Untested but I think that's how it would work.

github-actions[bot] commented 1 year ago

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory