Skip to content

Gridex:原生 macOS/Windows 数据库内置 AI 对话的原生数据库 IDE,支持 PostgreSQL、MySQL、SQLite、Redis、MongoDB 和 SQL Server #1086

Gridex:原生 macOS/Windows 数据库内置 AI 对话的原生数据库 IDE,支持 PostgreSQL、MySQL、SQLite、Redis、MongoDB 和 SQL Server

Gridex:原生 macOS/Windows 数据库内置 AI 对话的原生数据库 IDE,支持 PostgreSQL、MySQL、SQLite、Redis、MongoDB 和 SQL Server #1086

Workflow file for this run

name: Create RSS
on:
issues:
types: [labeled]
jobs:
create-rss:
if: github.repository == 'jaywcjlove/quick-rss' && github.event_name == 'issues' && contains(github.event.issue.labels.*.name, 'weekly')
runs-on: ubuntu-latest
steps:
- name: Get the label modifier
id: get_modifier # 设置一个 ID,用于后续步骤引用
run: |
MODIFIER=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/events" \
| jq -r '[.[] | select(.event == "labeled" and .label.name == "weekly")] | last | .actor.login')
echo "Label modifier: $MODIFIER"
# 将修改者 login 写入环境变量
echo "MODIFIER=$MODIFIER" >> $GITHUB_ENV
echo "modifier=$MODIFIER" >> "$GITHUB_OUTPUT"
- name: Debug modifier output
run: |
echo "Modifier output is: ${{ steps.get_modifier.outputs.modifier }}"
- uses: actions/checkout@v6
if: steps.get_modifier.outputs.modifier == 'jaywcjlove'
- uses: actions/setup-node@v6
if: steps.get_modifier.outputs.modifier == 'jaywcjlove'
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- run: npm install
if: steps.get_modifier.outputs.modifier == 'jaywcjlove'
- name: Create RSS
run: node .github/scripts/create-rss.mjs
# 判断是不是仓库作者更新的 label,并且判断是否包含 weekly
if: steps.get_modifier.outputs.modifier == 'jaywcjlove'
env:
ISSUE_BODY: ${{ github.event.issue.body }}
ISSUE_LINK: ${{ github.event.issue.html_url }}
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_ID: ${{ github.event.issue.number }}
ISSUE_DATE: ${{ github.event.issue.created_at }}
ISSUE_AUTHOR: ${{ github.event.issue.user.login }}
ISSUE_AVATAR: ${{ github.event.issue.user.avatar_url }}
- name: Commit changes
if: steps.get_modifier.outputs.modifier == 'jaywcjlove'
env:
ISSUE_ID: ${{ github.event.issue.number }}
ISSUE_TITLE: ${{ github.event.issue.title }}
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
# 获取当前分支名称
CURRENT_BRANCH=$(echo ${GITHUB_REF#refs/heads/})
git add .
git commit -m "Quick RSS Feed: $ISSUE_TITLE #$ISSUE_ID" -m "https://wangchujiang.com/quick-rss/issue/$ISSUE_ID.html"
git push origin $CURRENT_BRANCH
- name: Comment on Issue
uses: actions/github-script@v7
if: steps.get_modifier.outputs.modifier == 'jaywcjlove'
env:
ISSUE_ID: ${{ github.event.issue.number }}
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_BODY: ${{ github.event.issue.body }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const issue_number = process.env.ISSUE_ID;
const issue_title = process.env.ISSUE_TITLE;
const issue_body = process.env.ISSUE_BODY;
const owner = 'jaywcjlove';
const repo = 'quick-rss';
// 使用与脚本相同的方法获取 detailLink
let mentionUser = '';
if (issue_body) {
const data = issue_body.split(/##+\s+[📋🔗]+\s.+/ig).map((txt) => txt.replace(/[\n\r\s]+$/g, '')).filter(Boolean);
const detailLink = (data[1] ?? "").replace(/(^[\n\s\r]+)|([\n\s\r]+$)/, '');
// 从 detailLink 中提取 GitHub username
if (detailLink) {
const githubUrlMatch = detailLink.match(/https?:\/\/github\.com\/([a-zA-Z0-9](?:[a-zA-Z0-9]|-(?![a-zA-Z0-9]*-))*[a-zA-Z0-9])/);
if (githubUrlMatch && githubUrlMatch[1]) {
mentionUser = ` @${githubUrlMatch[1]}`;
}
}
}
const comment_body = `🚀 **自动发布完成!** 请查看预览:[${issue_title}](https://wangchujiang.com/quick-rss/issue/${issue_number}.html)
记录和分享技术内容!您可以通过下面的 RSS 链接订阅社区分享的宝贵内容。此外,您还可以通过 issue 提交、推荐或自荐您的文章、软件或资源,它们将被自动添加到 RSS 源中。
**🔗 RSS 订阅链接:** https://wangchujiang.com/quick-rss/feed.xml
**📝 投稿链接:** https://github.com/jaywcjlove/quick-rss/issues/new/choose
---
🚀 **Auto-publish completed!** Preview: [${issue_title}](https://wangchujiang.com/quick-rss/issue/${issue_number}.html)
Record and share technical content! You can subscribe to valuable content shared by the community through the RSS link below. Additionally, you can submit, recommend, or self-recommend your articles, software, or resources through issues, and they will be automatically added to the RSS feed.
**🔗 RSS Feed Link:** https://wangchujiang.com/quick-rss/feed.xml
**📝 Submit Link:** https://github.com/jaywcjlove/quick-rss/issues/new/choose
${mentionUser ? '\n' + mentionUser : ''}`;
await github.rest.issues.createComment({
owner,
repo,
issue_number,
body: comment_body
});
- name: Trigger Deploy
uses: actions/github-script@v8
if: steps.get_modifier.outputs.modifier == 'jaywcjlove'
with:
script: |
const res = await github.rest.repos.createDispatchEvent({
owner: 'jaywcjlove',
repo: 'quick-rss',
event_type: 'run-deploy'
});
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}