Skip to content

test

test #12

Workflow file for this run

name: Issue Listener
on:
issues:
types:
- opened
- edited
issue_comment:
types:
- created
- edited
jobs:
check-issue:
name: Check Issue
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: denoland/setup-deno@v1
with:
deno-version: v1.37.2
- name: Check Issue and Comment
id: check
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const issue = context.payload.issue;
const comment = context.payload.comment;
const description = issue.body;
if (description.includes('#request-upload-plugin')) {
const commentBody = comment.body.toLowerCase();
if (commentBody.includes('accept')) {
console.log('Accepted issue:', issue.number);
return { id: issue.number, user: issue.user.login }
} else {
console.log('Issue not accepted:', issue.number);
return false
}
}
- name: Setup env
run: |
echo '' > .env
echo 'OK_OWNER="manga-raiku"' >> .env
echo 'OK_REPO="service-market-raiku"' >> .env
echo 'OK_BRANCH="main"' >> .env
- name: Run scripts upload plugin
id: run
if: steps.check.outputs.result != 'false'
run: deno run --allow-read --allow-env --allow-net ./scripts/upload-plugin.ts ${{ steps.check.outputs.result.user }} ${{ steps.check.outputs.result.id }}