Skip to content

Delphinus Lab 10月27日深圳线下Meetup #199

Delphinus Lab 10月27日深圳线下Meetup

Delphinus Lab 10月27日深圳线下Meetup #199

Workflow file for this run

name: new event actions
on:
issues:
types: [opened]
workflow_dispatch:
jobs:
newevent:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Change README.md
run: |
time=$(date +%F -d "${{github.event.issue.updated_at}}")
echo "- [${{ github.event.issue.title}}](${{github.event.issue.html_url}}) $time" >> README.md
- name: Commit files
run: |
git config --local user.name ${{ github.actor }}
git config --local user.email "[email protected]"
git add README.md
git commit -m "submit new event (Automated)"
- name: Push changes
uses: ad-m/github-push-action@master
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
force: true
- name: reply
run: gh issue comment $ISSUE --body "欢迎您提交活动信息,Rebase 会整理活动内容,通过公众号发出。"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE: ${{ github.event.issue.html_url }}
push-telegram:
runs-on: ubuntu-latest
needs: newevent
steps:
- name: Send to telegram
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
新的活动 ${{github.event.issue.html_url}}
##################################################
new-discussion:
permissions: write-all
runs-on: ubuntu-latest
needs: newevent
steps:
- run: |
gh api -i graphql -f query='
mutation {
createDiscussion(
input: {repositoryId: "R_kgDOG8AAIw", categoryId: "DIC_kwDOG8AAI84CN7cU",
title: "${{github.event.issue.title}}", body: "${{github.event.issue.body}}"
}
)
{
discussion {
id
number
title
}
}
}
'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}