parent
7cb1d0c4e0
commit
87efa15abf
@ -0,0 +1,26 @@ |
|||||||
|
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') |
||||||
|
runs-on: ubuntu-latest |
||||||
|
permissions: |
||||||
|
issues: write |
||||||
|
steps: |
||||||
|
- name: Checkout code |
||||||
|
uses: actions/checkout@v3 |
||||||
|
|
||||||
|
- name: Assign the issue |
||||||
|
run: | |
||||||
|
export LETASE_MILESTONES=$(curl "https://api.github.com/repos/$OWNER/$REPO/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. <br>I set the milestones for this issue to $LETASE_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 }} |
@ -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.0 |
||||||
|
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) <br> ' |
||||||
|
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).<br> The signed information is recorded [🤖here](https://github.com/openim-sigs/cla/tree/main/signatures/${{ env.OPEN_IM_SERVER_ALLOWLIST }}/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 |
@ -0,0 +1,64 @@ |
|||||||
|
name: OpenIM Server Release |
||||||
|
|
||||||
|
on: |
||||||
|
push: |
||||||
|
# run only against tags |
||||||
|
tags: |
||||||
|
- '*' |
||||||
|
|
||||||
|
permissions: |
||||||
|
contents: write |
||||||
|
packages: write |
||||||
|
issues: write |
||||||
|
|
||||||
|
jobs: |
||||||
|
goreleaser: |
||||||
|
runs-on: ubuntu-latest |
||||||
|
steps: |
||||||
|
- uses: actions/checkout@v3 |
||||||
|
with: |
||||||
|
fetch-depth: 0 |
||||||
|
- run: git fetch --force --tags |
||||||
|
- uses: actions/setup-go@v4 |
||||||
|
with: |
||||||
|
go-version: stable |
||||||
|
# More assembly might be required: Docker logins, GPG, etc. It all depends |
||||||
|
# on your needs. |
||||||
|
- uses: goreleaser/goreleaser-action@v4 |
||||||
|
with: |
||||||
|
# either 'goreleaser' (default) or 'goreleaser-pro': |
||||||
|
distribution: goreleaser |
||||||
|
version: latest |
||||||
|
args: release --clean |
||||||
|
env: |
||||||
|
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3 |
||||||
|
with: |
||||||
|
fetch-depth: 0 |
||||||
|
- uses: arduino/setup-task@e26d8975574116b0097a1161e0fe16ba75d84c1c # v1 |
||||||
|
with: |
||||||
|
version: 3.x |
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }} |
||||||
|
- uses: docker/setup-qemu-action@2b82ce82d56a2a04d2637cd93a637ae1b359c0a7 # v2 |
||||||
|
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3 |
||||||
|
with: |
||||||
|
path: | |
||||||
|
./_output/dist/*.deb |
||||||
|
./_output/dist/*.rpm |
||||||
|
./_output/dist/*.apk |
||||||
|
key: ${{ github.ref }} |
||||||
|
- run: task goreleaser:test:${{ matrix.format }} |
Loading…
Reference in new issue