diff --git a/.github/workflows/ambient.yml b/.github/workflows/ambient.yml new file mode 100644 index 0000000..7751787 --- /dev/null +++ b/.github/workflows/ambient.yml @@ -0,0 +1,25 @@ +name: Ambient + +on: + issue_comment: + types: [created] + +permissions: + contents: read + +jobs: + ambient: + if: >- + startsWith(github.event.comment.body, '@ambient') && + contains(fromJSON('["OWNER","MEMBER"]'), github.event.comment.author_association) + runs-on: ubuntu-latest + steps: + - uses: ambient-code/ambient-action@v2 + with: + api-url: ${{ secrets.AMBIENT_API_URL }} + api-token: ${{ secrets.AMBIENT_BOT_TOKEN }} + project: gps-ambient-action + prompt: ${{ github.event.comment.body }} + display-name: "Issue #${{ github.event.issue.number }}" + repos: '[{"url": "https://github.com/${{ github.repository }}", "branch": "ambient/issue-${{ github.event.issue.number }}", "autoPush": true}]' + labels: '{"source": "github-issue", "issue": "${{ github.event.issue.number }}"}'