A Github Action to create comments on your forgejo instance via API.
Add FORGEJO_API_URL to your repo vars and FORGEJO_TOKEN to your repo secrets.
jobs:
job1:
runs-on: ubuntu-latest
steps:
- name: Run Forgejo API Action
uses: timherrm/forgejo-CreateComment@v1
with:
api_url: ${{ vars.FORGEJO_API_URL }}
token: ${{ secrets.FORGEJO_TOKEN }}
repository: "owner/repo"
index: 123
body: "This is my comment" #optional
#debug: true #optional
see action.yml
Clone the project
git clone https://github.com/timherrm/forgejo-CreateCommentGo to the project directory
cd forgejo-CreateCommentRun
brew install act node
npm install @actions/core @actions/github axios @vercel/ncc
npm init -y
ncc build src/main.js -o dist
act --var-file .variables