diff --git a/.github/workflows/issue_comment.reminder.yml b/.github/workflows/issue_comment.reminder.yml new file mode 100644 index 0000000..a1e55c5 --- /dev/null +++ b/.github/workflows/issue_comment.reminder.yml @@ -0,0 +1,14 @@ +name: Issue Comment (Reminder) + +on: + issue_comment: + types: [created, edited] + +jobs: + reminder: + name: ๐Ÿ‘€ Create reminder + runs-on: ubuntu-latest + + steps: + - name: ๐Ÿ‘€ check for reminder + uses: agrc/create-reminder-action@v1 diff --git a/.github/workflows/issue_comment.validate.yml b/.github/workflows/issue_comment.validate.yml new file mode 100644 index 0000000..7eae661 --- /dev/null +++ b/.github/workflows/issue_comment.validate.yml @@ -0,0 +1,44 @@ +name: Issue Comment (Validate Addresses) + +on: + issue_comment: + types: [created] + +permissions: + issues: write + +jobs: + validate: + name: โœ… Validate addresses + runs-on: ubuntu-latest + steps: + - name: Add emoji to comment + uses: actions/github-script@v7 + with: + script: | + const comment = context.payload.comment; + const body = comment.body; + + if (!body.startsWith('/validate addresses')) { + return; + } + + github.rest.reactions.createForIssueComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: context.payload.comment.id, + content: 'eyes' + }); + - name: โฌ‡๏ธ Set up code + uses: actions/checkout@v4 + with: + show-progress: false + - name: ๐Ÿ“ฅ Download dependencies + run: npm ci + - name: ๐Ÿ— Run build command + run: npm run build + - name: ๐Ÿงช Test addresses + uses: agrc/validate-address-action@v1 + with: + API_KEY: ${{ secrets.API_KEY }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/schedule.reminder.yml b/.github/workflows/schedule.reminder.yml new file mode 100644 index 0000000..338bec0 --- /dev/null +++ b/.github/workflows/schedule.reminder.yml @@ -0,0 +1,18 @@ +name: Schedule (Reminder comments) + +on: + schedule: + - cron: '0 9-17/2 * * 1-5' + workflow_dispatch: + +permissions: + issues: write + +jobs: + reminder: + name: โฐ Punch reminders + runs-on: ubuntu-latest + + steps: + - name: ๐Ÿ”” check reminders and notify + uses: agrc/reminder-action@v1