diff --git a/.github/.codecov.yml b/.github/.codecov.yml new file mode 100644 index 0000000..45e2131 --- /dev/null +++ b/.github/.codecov.yml @@ -0,0 +1,9 @@ +coverage: + status: + project: + default: false # disable the default status that measures entire project + pkg: # declare a new status context "pkg" + paths: + - pkg/* # only include coverage in "pkg/" folder + informational: true # Always pass check + patch: off # disable the commit only checks \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..f495b58 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,45 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "gomod" + directory: "/" + schedule: + interval: "daily" + time: "08:00" + labels: + - "dependencies" + commit-message: + prefix: "feat" + include: "scope" + groups: + gomod-deps: + patterns: + - "*" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + time: "08:00" + labels: + - "dependencies" + commit-message: + prefix: "chore" + include: "scope" + groups: + github-actions: + patterns: + - "*" + - package-ecosystem: "docker" + directory: "/" + schedule: + interval: "daily" + time: "08:00" + labels: + - "dependencies" + commit-message: + prefix: "feat" + include: "scope" \ No newline at end of file diff --git a/.github/labels.yml b/.github/labels.yml new file mode 100644 index 0000000..0377905 --- /dev/null +++ b/.github/labels.yml @@ -0,0 +1,29 @@ +# Refer to Kubernetes for size/* Settings +# https://github.com/Kubernetes/Kubernetes +XS: + name: size/XS + lines: 0 + color: 3CBF00 +S: + name: size/S + lines: 10 + color: 5D9801 +M: + name: size/M + lines: 30 + color: 7F7203 +L: + name: size/L + lines: 100 + color: A14C05 +XL: + name: size/XL + lines: 500 + color: C32607 +XXL: + name: size/XXL + lines: 1000 + color: E50009 + comment: | + # Whoa! Easy there, Partner! + This PR is too big. Please break it up into smaller PRs. \ No newline at end of file diff --git a/.github/version b/.github/version new file mode 100644 index 0000000..e69de29 diff --git a/.github/weekly-digest.yml b/.github/weekly-digest.yml new file mode 100644 index 0000000..9deb72e --- /dev/null +++ b/.github/weekly-digest.yml @@ -0,0 +1,7 @@ +# https://github.com/apps/weekly-digest/installations/new +publishDay: sun +canPublishIssues: true +canPublishPullRequests: true +canPublishContributors: true +canPublishStargazers: true +canPublishCommits: true \ No newline at end of file diff --git a/.github/workflows/auto-assign-issue.yml b/.github/workflows/auto-assign-issue.yml new file mode 100644 index 0000000..4fc1f01 --- /dev/null +++ b/.github/workflows/auto-assign-issue.yml @@ -0,0 +1,29 @@ +name: Assign issue to comment author +on: + issue_comment: + types: [created] +jobs: + assign-issue: + if: | + contains(github.event.comment.body, '/assign') || contains(github.event.comment.body, '/accept') && + !contains(github.event.comment.user.login, 'openimbot') && + !contains(github.event.comment.user.login, 'kubbot') + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Assign the issue + run: | + export LETASE_MILESTONES=$(curl 'https://api.github.com/repos/$OWNER/$PEPO/milestones' | jq -r 'last(.[]).title') + gh issue edit ${{ github.event.issue.number }} --add-assignee "${{ github.event.comment.user.login }}" + gh issue edit ${{ github.event.issue.number }} --add-label "triage/accepted" + gh issue edit ${{ github.event.issue.number }} --milestone "$LETASE_MILESTONES" + gh issue comment $ISSUE --body "@${{ github.event.comment.user.login }} Glad to see you accepted this issue🤲, this issue has been assigned to you. I set the milestones for this issue to [$LETASE_MILESTONES](https://github.com/$OWNER/$PEPO/milestones), We are looking forward to your PR!" + env: + GH_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }} + ISSUE: ${{ github.event.issue.html_url }} + OWNER: ${{ github.repository_owner }} + REPO: ${{ github.event.repository.name }} \ No newline at end of file diff --git a/.github/workflows/auto-gh-pr.yml b/.github/workflows/auto-gh-pr.yml new file mode 100644 index 0000000..ebc392e --- /dev/null +++ b/.github/workflows/auto-gh-pr.yml @@ -0,0 +1,47 @@ +name: Auto PR to release + +on: + pull_request: + # types: + # - closed + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] + +jobs: + create-pr: + runs-on: ubuntu-latest + if: github.event.pull_request.base.ref == 'main' + # && github.event.pull_request.merged == true + steps: + - name: Check out code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Create PR to release branch + run: | + ISSUEID=$(gh pr view ${{ github.event.pull_request.number }} --repo $OWNER/$REPO | grep -oP 'Fixes #\K\d+') + echo "===========> $ISSUEID" + ISSUE=$(gh issue view $ISSUEID --repo $OWNER/$REPO --json labels,assignees,milestone,title) + echo "===========> $ISSUE" + + LABELS=$(echo $ISSUE | jq -r '.labels[] | select(.name) | .name' | jq -R -r -s -c 'split("\n")[:-1] | join(",")') + ASSIGNEES=$(echo $ISSUE | jq -r '.assignees[] | select(.login) | .login' | jq -R -s -c 'split("\n")[:-1] | join(",")') + MILESTONE=$(echo $ISSUE | jq -r '.milestone | select(.title) | .title') + TITLE=$(echo $ISSUE | jq -r '.title') + + gh pr edit ${{ github.event.pull_request.number }} --repo $OWNER/$REPO --add-label "$LABELS" --add-assignee "$ASSIGNEES" --milestone "$MILESTONE" + + # git checkout -b bot/merge-to-release-$ISSUEID + # git push origin bot/merge-to-release-$ISSUEID + # gh pr create --base release --head bot/merge-to-release-$ISSUEID --title "Merge main to release" --body "" + # gh pr create --base main --head feat/auto-release-pr-624 --title "The bug is fixed" --body "$x" --repo SoraEase/sora-prompt --reviewer "cubxxw" + continue-on-error: true + env: + GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} + GH_TOKEN: ${{ github.token }} + ISSUE: ${{ github.event.issue.html_url }} + OWNER: ${{ github.repository_owner }} + REPO: ${{ github.event.repository.name }} diff --git a/.github/workflows/auto-invite.yml b/.github/workflows/auto-invite.yml new file mode 100644 index 0000000..04908f3 --- /dev/null +++ b/.github/workflows/auto-invite.yml @@ -0,0 +1,39 @@ +name: Invite users to join our group +on: + issue_comment: + types: + - created +jobs: + issue_comment: + name: Invite users to join our group + if: ${{ github.event.comment.body == '/invite' || github.event.comment.body == '/close' || github.event.comment.body == '/comment' }} + runs-on: ubuntu-latest + permissions: + issues: write + steps: + + - name: Invite user to join our group + uses: peter-evans/create-or-update-comment@v4 + with: + token: ${{ secrets.BOT_GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + body: | + We value close connections with our users, developers, and contributors here at Open-IM-Server. With a large community and maintainer team, we're always here to help and support you. Whether you're looking to join our community or have any questions or suggestions, we welcome you to get in touch with us. + + Our most recommended way to get in touch is through [Slack](https://join.slack.com/t/soraease/shared_invite/zt-2dr0l7log-11w5GorUwU8hxzR7xByICQ). Even if you're in China, Slack is usually not blocked by firewalls, making it an easy way to connect with us. Our Slack community is the ideal place to discuss and share ideas and suggestions with other users and developers of Open-IM-Server. You can ask technical questions, seek help, or share your experiences with other users of Open-IM-Server. + + In addition to Slack, we also offer the following ways to get in touch: + + + Get in touch with us on [Gmail](https://mail.google.com/mail/u/0/?fs=1&tf=cm&to=3293172751nss@gmail.com). If you have any questions or issues that need resolving, or any suggestions and feedback for our open source projects, please feel free to contact us via email. + + Read our [blog](https://doc.rentsoft.cn/). Our blog is a great place to stay up-to-date with Open-IM-Server projects and trends. On the blog, we share our latest developments, tech trends, and other interesting information. + + Add [Wechat](https://github.com/OpenIMSDK/OpenIM-Docs/blob/main/docs/images/WechatIMG20.jpeg) and indicate that you are a user or developer of Open-IM-Server. We will process your request as soon as possible. + + - name: Close Issue + uses: peter-evans/close-issue@v3 + with: + token: ${{ secrets.BOT_GITHUB_TOKEN }} + issue-number: ${{ github.event.issue.number }} + comment: 🤖 Auto-closing issue, if you still need help please reopen the issue or ask for help in the community above + labels: | + triage/accepted \ No newline at end of file diff --git a/.github/workflows/auto-pull-request.yml b/.github/workflows/auto-pull-request.yml new file mode 100644 index 0000000..5512863 --- /dev/null +++ b/.github/workflows/auto-pull-request.yml @@ -0,0 +1,57 @@ +name: Github Pull Request +on: + workflow_dispatch: + schedule: + - cron: '0 2 * * *' + +permissions: + contents: write + pull-requests: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + + + - name: Generate Vertions + run: | + latest_tag=$(git describe --tags `git rev-list --tags --max-count=1` | grep -oE '[0-9]+\.[0-9]+\.[0-9]+') + echo $latest_tag > .github/version + continue-on-error: true + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + with: + token: ${{ secrets.BOT_GITHUB_TOKEN }} + commit-message: "cicd: bump League Patch" + author: kubbot <3293172751ysy@gmail.com> + committer: kubbot <3293172751ysy@gmail.com> + # signoff: false + # draft: false + branch: "asf-auto-updates" + assignees: cubxxw + reviewers: cubxxw + title: "[Auto PR 🤖] Bump League Patch auto PR" + body: | + I am a PR generated by robot automation. + + Review criteria: + + - [ ] Disenchanter can connect and issue actions + + Github Actions Status: + + [![Github Pull Request](https://github.com/SoraEase/sora-prompt/actions/workflows/auto-pull-request.yml/badge.svg)](https://github.com/SoraEase/sora-prompt/actions/workflows/aotu-pull-request.yml) + + This is an automated PR. + [workflow](https://github.com/SoraEase/sora-prompt/blob/main/.github/workflows/pull-request.yml). + labels: | + kind/documentation + enhancement + report \ No newline at end of file diff --git a/.github/workflows/auto-push.yml b/.github/workflows/auto-push.yml new file mode 100644 index 0000000..5c9aa05 --- /dev/null +++ b/.github/workflows/auto-push.yml @@ -0,0 +1,31 @@ +name: Update README with latest blog posts + +on: + schedule: # Run workflow automatically + - cron: "0 * * * *" # Runs every hour, on the hour + workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the GitHub Actions Workflow page directly + push: +jobs: + update-readme-with-blog: + name: Update this repo's README with latest blog posts + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + # - name: Set up Git + # run: | + # git config --global user.name "kubbot" + # git config --global user.email "3293172751ysy@gmail.com" + + # 运行一系列 shell 命令,配置本地 Git 设置,从远程库拉取最新版本并推送到远程库。 + - name: Auto green + run: | + git config --local user.email "3293172751ysy@gmail.com" + git config --local user.name "kubbot" + git remote set-url origin https://${{ secrets.BOT_GITHUB_TOKEN }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} + git pull --rebase + # 将 UTC 时间转换为上海时间 + local_time=$(date -u -d "$(date -u)" "+%Y-%m-%d %H:%M:%S" -d "8 hours") + # 允许空提交,-a 省略git add . 而且设置签名 + git commit --allow-empty -a -s -m "🌟 SoraEase makes it easier for Sora developers to develop Sora AI 💪" + git push diff --git a/.github/workflows/auto-tag.yml b/.github/workflows/auto-tag.yml new file mode 100644 index 0000000..f05474d --- /dev/null +++ b/.github/workflows/auto-tag.yml @@ -0,0 +1,38 @@ +name: Create Tag + +on: + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] + +jobs: + create_tag: + runs-on: ubuntu-latest + if: startsWith(github.event.comment.body, '/create tag') + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Validate version number and get comment + id: validate + run: | + COMMENT="${{ github.event.comment.body }}" + VERSION=$(echo $COMMENT | cut -d ' ' -f 3) + TAG_COMMENT=$(echo $COMMENT | cut -d '"' -f 2) + if [[ $VERSION =~ ^v([0-9]+\.){2}[0-9]+$ ]]; then + echo "version=$VERSION" >> $GITHUB_STATE + echo "tag_comment=$TAG_COMMENT" >> $GITHUB_STATE + else + echo "Invalid version number." + exit 1 + fi + + - name: Create a new tag + env: + GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} + run: | + source $GITHUB_STATE + git tag -a $VERSION -m "$tag_comment" + git push origin $VERSION + echo "tag_created=$VERSION" >> $GITHUB_OUTPUT diff --git a/.github/workflows/blog-post-workflow.yml b/.github/workflows/blog-post-workflow.yml new file mode 100644 index 0000000..4233b39 --- /dev/null +++ b/.github/workflows/blog-post-workflow.yml @@ -0,0 +1,164 @@ +name: Update README with latest blog posts + +on: + schedule: # Run workflow automatically + - cron: "15 8-11 */2 * *" # Runs every hour, on the hour + workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the GitHub Actions Workflow page directly + push: +jobs: + update-readme-with-blog: + name: Update this repo's README with latest blog posts + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + # - name: Set up Git + # run: | + # git config --global user.name "kubbot" + # git config --global user.email "3293172751ysy@gmail.com" + + - name: Pull in dev.to posts + uses: gautamkrishnar/blog-post-workflow@v1 + with: + comment_tag_name: "My-Blog-EN" + feed_list: "https://nsddd.top/index.xml" + token: ${{ secrets.BOT_GITHUB_TOKEN }} + max_post_count: 100 + commit_message: "🔥docs(main): update with latest RadioGeek feed from EN" + committer_username: "kubbot" + disable_html_encoding: true + + update-readme-with-blog-zh: + name: Update this repo's README with latest blog posts + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + # - name: Set up Git + # run: | + # git config --global user.name "kubbot" + # git config --global user.email "3293172751ysy@gmail.com" + + - name: Pull in Chinese posts + uses: gautamkrishnar/blog-post-workflow@v1 + with: + comment_tag_name: "My-Blog-ZH" + feed_list: "https://nsddd.top/zh/index.xml" + token: ${{ secrets.BOT_GITHUB_TOKEN }} + max_post_count: 100 + commit_message: "🔥docs(main): update with latest RadioGeek feed from ZH" + committer_username: "kubbot" + disable_html_encoding: true + # 运行一系列 shell 命令,配置本地 Git 设置,从远程库拉取最新版本并推送到远程库。 + - name: Auto green + run: | + git config --local user.email "3293172751ysy@gmail.com" + git config --local user.name "kubbot" + git remote set-url origin https://${{ secrets.BOT_GITHUB_TOKEN }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} + git pull --rebase + # 将 UTC 时间转换为上海时间 + local_time=$(date -u -d "$(date -u)" "+%Y-%m-%d %H:%M:%S" -d "8 hours") + # 允许空提交,-a 省略git add . 而且设置签名 + git commit --allow-empty -a -s -m "🌟 You never lose, either you win or you learn! 💪" + git push + + update-readme-with-blog-es: + name: Update this repo's README with latest blog posts + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + # - name: Set up Git + # run: | + # git config --global user.name "kubbot" + # git config --global user.email "3293172751ysy@gmail.com" + - name: Pull in Spanish posts + uses: gautamkrishnar/blog-post-workflow@v1 + with: + comment_tag_name: "My-Blog-ES" + feed_list: "https://nsddd.top/es/index.xml" + token: ${{ secrets.BOT_GITHUB_TOKEN }} + max_post_count: 100 + commit_message: "🔥docs(main): update with latest RadioGeek feed from ES" + committer_username: "kubbot" + # disable_html_encoding: true + # 运行一系列 shell 命令,配置本地 Git 设置,从远程库拉取最新版本并推送到远程库。 + - name: Auto green + run: | + git config --local user.email "3293172751ysy@gmail.com" + git config --local user.name "kubbot" + git remote set-url origin https://${{ secrets.BOT_GITHUB_TOKEN }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} + git pull --rebase + # 将 UTC 时间转换为上海时间 + local_time=$(date -u -d "$(date -u)" "+%Y-%m-%d %H:%M:%S" -d "8 hours") + git commit --allow-empty -a -s -m "🌟 You never lose, either you win or you learn! 💪" + git push + + update-readme-with-blog-fr: + name: Update this repo's README with latest blog posts + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + # - name: Set up Git + # run: | + # git config --global user.name "kubbot" + # git config --global user.email "3293172751ysy@gmail.com" + - name: Pull in French posts + uses: gautamkrishnar/blog-post-workflow@v1 + with: + comment_tag_name: "My-Blog-FR" + feed_list: "https://nsddd.top/fr/index.xml" + token: ${{ secrets.BOT_GITHUB_TOKEN }} + max_post_count: 100 + commit_message: "🔥docs(main): update with latest RadioGeek feed from FR" + committer_username: "kubbot" + # disable_html_encoding: true + # 运行一系列 shell 命令,配置本地 Git 设置,从远程库拉取最新版本并推送到远程库。 + - name: Auto green + run: | + git config --local user.email "3293172751ysy@gmail.com" + git config --local user.name "kubbot" + git remote set-url origin https://${{ secrets.BOT_GITHUB_TOKEN }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} + git pull --rebase + # 将 UTC 时间转换为上海时间 + local_time=$(date -u -d "$(date -u)" "+%Y-%m-%d %H:%M:%S" -d "8 hours") + # 允许空提交,-a 省略git add . 而且设置签名 + git commit --allow-empty -a -s -m "🌟 You never lose, either you win or you learn! 💪" + git push + + # https://nsddd.top/zh-tw/index.xml + update-readme-with-blog-zh-tw: + name: Update this repo's README with latest blog posts + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + # - name: Set up Git + # run: | + # git config --global user.name "kubbot" + # git config --global user.email "3293172751ysy@gmail.com" + + - name: Pull in Chinese posts + uses: gautamkrishnar/blog-post-workflow@v1 + with: + comment_tag_name: "My-Blog-TW" + feed_list: "https://nsddd.top/zh-tw/index.xml" + token: ${{ secrets.BOT_GITHUB_TOKEN }} + max_post_count: 100 + commit_message: "🔥docs(main): update with latest RadioGeek feed from TW" + committer_username: "kubbot" + disable_html_encoding: true + + # 运行一系列 shell 命令,配置本地 Git 设置,从远程库拉取最新版本并推送到远程库。 + - name: Auto green + run: | + git config --local user.email "3293172751ysy@gmail.com" + git config --local user.name "kubbot" + git remote set-url origin https://${{ secrets.BOT_GITHUB_TOKEN }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} + git pull --rebase + # 将 UTC 时间转换为上海时间 + local_time=$(date -u -d "$(date -u)" "+%Y-%m-%d %H:%M:%S" -d "8 hours") + # 允许空提交,-a 省略git add . 而且设置签名 + git commit --allow-empty -a -s -m "🌟 You never lose, either you win or you learn! 💪" + git push diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml new file mode 100644 index 0000000..2fe5297 --- /dev/null +++ b/.github/workflows/cla.yml @@ -0,0 +1,48 @@ +name: "OpenIM CLA Assistant" +on: + issue_comment: + types: [created] + pull_request_target: + types: [opened,closed,synchronize] + +# explicitly configure permissions, in case your GITHUB_TOKEN workflow permissions are set to read-only in repository settings +permissions: + actions: write + contents: write + pull-requests: write + statuses: write + +env: + # Define Open-IM-Server variables here + OPEN_IM_SERVER_REMOTE_ORGANIZATION: openim-sigs + REMOTE_REPOSITORY: cla + OPEN_IM_SERVER_CLA_DOCUMENT: https://github.com/openim-sigs/cla/blob/main/README.md + OPEN_IM_SERVER_SIGNATURES_PATH: signatures/${{ github.event.repository.name }}/cla.json + + OPEN_IM_SERVER_ALLOWLIST: kubbot,bot* + +jobs: + CLAAssistant: + runs-on: ubuntu-latest + steps: + - name: "CLA Assistant" + if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' + uses: contributor-assistant/github-action@v2.3.1 + env: + GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} + PERSONAL_ACCESS_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }} + with: + path-to-signatures: ${{ env.OPEN_IM_SERVER_SIGNATURES_PATH }} + path-to-document: ${{ env.OPEN_IM_SERVER_CLA_DOCUMENT }} + branch: 'main' + allowlist: ${{ env.OPEN_IM_SERVER_ALLOWLIST }} + + remote-organization-name: ${{ env.OPEN_IM_SERVER_REMOTE_ORGANIZATION }} + remote-repository-name: ${{ env.REMOTE_REPOSITORY }} + + create-file-commit-message: '📚 Docs: Creating file for storing ${{ github.event.repository.name }} CLA Signatures' + custom-notsigned-prcomment: '💕 Thank you for your contribution and please kindly read and sign our [🎯https://github.com/openim-sigs/cla/blob/main/README.md](https://github.com/openim-sigs/cla/blob/main/README.md).
If you wish to sign the CRA, **Please copy and comment on the following sentence:**' + custom-pr-sign-comment: 'I have read the CLA Document and I hereby sign the CLA' + custom-allsigned-prcomment: '🤖 All Contributors have signed the [${{ github.event.repository.name }} CLA](https://github.com/openim-sigs/cla/blob/main/README.md).
The signed information is recorded [🤖here](https://github.com/openim-sigs/cla/tree/main/signatures/${{ github.event.repository.name }}/cla.json)' + # lock-pullrequest-aftermerge: false - if you don't want this bot to automatically lock the pull request after merging (default - true) + # use-dco-flag: true - If you are using DCO instead of CLA diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml new file mode 100644 index 0000000..06fdff2 --- /dev/null +++ b/.github/workflows/greetings.yml @@ -0,0 +1,35 @@ +name: first-interaction + +on: + issues: + types: [opened] + pull_request: + branches: [main] + types: [opened] + +jobs: + check_for_first_interaction: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/first-interaction@v1.3.0 + with: + repo-token: ${{ secrets.BOT_GITHUB_TOKEN }} + pr-message: | + Hello! Thank you for your contribution. + + If you are fixing a bug, please reference the issue number in the description. + + If you are implementing a feature request, please check with the maintainers that the feature will be accepted first. + + [Join slack 🤖](https://join.slack.com/t/soraease/shared_invite/zt-2dr0l7log-11w5GorUwU8hxzR7xByICQ) to connect and communicate with our developers. + + Please leave your information in the [✨ discussions](https://github.com/orgs/OpenIMSDK/discussions/426), we expect anyone to join OpenIM developer community. + + issue-message: | + Hello! Thank you for filing an issue. + + If this is a bug report, please include relevant logs to help us debug the problem. + + [Join slack 🤖](https://join.slack.com/t/soraease/shared_invite/zt-2dr0l7log-11w5GorUwU8hxzR7xByICQ) to connect and communicate with our developers. + continue-on-error: true \ No newline at end of file diff --git a/.github/workflows/help-comment-issue.yml b/.github/workflows/help-comment-issue.yml new file mode 100644 index 0000000..7adf9b1 --- /dev/null +++ b/.github/workflows/help-comment-issue.yml @@ -0,0 +1,21 @@ +name: Good frist issue add comment +on: + issues: + types: + - labeled +jobs: + add-comment: + if: github.event.label.name == 'help wanted' || github.event.label.name == 'good first issue' + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - name: Add comment + uses: peter-evans/create-or-update-comment@v4 + with: + issue-number: ${{ github.event.issue.number }} + token: ${{ secrets.BOT_GITHUB_TOKEN }} + body: | + This issue is available for anyone to work on. **Make sure to reference this issue in your pull request.** :sparkles: Thank you for your contribution! :sparkles: + [Join slack 🤖](https://join.slack.com/t/soraease/shared_invite/zt-2dr0l7log-11w5GorUwU8hxzR7xByICQ) to connect and communicate with our developers. + If you wish to accept this assignment, please leave a comment in the comments section: `/accept`.🎯 diff --git a/.github/workflows/issue-robot.yml b/.github/workflows/issue-robot.yml new file mode 100644 index 0000000..74927a0 --- /dev/null +++ b/.github/workflows/issue-robot.yml @@ -0,0 +1,17 @@ +name: 'issue translator' +on: + issue_comment: + types: [created] + issues: + types: [opened] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: usthe/issues-translate-action@v2.7 + with: + # it is not necessary to decide whether you need to modify the issue header content + IS_MODIFY_TITLE: true + BOT_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} + # Required, input your bot github token \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7ac78d8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,67 @@ +name: OpenIM Server Release Workflow + +on: + push: + # run only against tags + tags: + - '*' + +permissions: + contents: write + packages: write + issues: write + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - run: git fetch --force --tags + - uses: actions/setup-go@v5 + with: + go-version: stable + # More assembly might be required: Docker logins, GPG, etc. It all depends + # on your needs. + - uses: goreleaser/goreleaser-action@v5 + with: + # either 'goreleaser' (default) or 'goreleaser-pro': + distribution: goreleaser + version: latest + workdir: . + args: release -f ./build/goreleaser.yaml --clean --release-footer-tmpl=scripts/template/footer.md.tmpl --release-header-tmpl=scripts/template/head.md.tmpl + env: + USERNAME: ${{ github.repository_owner }} + GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} + FURY_TOKEN: ${{ secrets.FURY_TOKEN }} + # Your GoReleaser Pro key, if you are using the 'goreleaser-pro' + # distribution: + # GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }} + + goreleaser-check-pkgs: + runs-on: ubuntu-latest + env: + DOCKER_CLI_EXPERIMENTAL: "enabled" + needs: [ goreleaser ] + if: github.ref == 'refs/heads/main' + strategy: + matrix: + format: [ deb, rpm, apk ] + steps: + - uses: actions/checkout@v4 # v3 + with: + fetch-depth: 0 + - uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v1 + with: + version: 3.x + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v2 + - uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v3 + with: + path: | + ./_output/dist/*.deb + ./_output/dist/*.rpm + ./_output/dist/*.apk + key: ${{ github.ref }} + - run: task goreleaser:test:${{ matrix.format }} \ No newline at end of file diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 0000000..dde062f --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,50 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Build the Jekyll site + uses: jekyll/actions-jekyll@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: '.' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./_site # Jekyll 的默认构建输出目录 diff --git a/README.md b/README.md index d3d5490..f312011 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # awesome-sora + 😎 Awesome list of interesting topics on Sora