-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of github.com:heartexlabs/label-studio into fb…
…-OPTIC-263
- Loading branch information
Showing
73 changed files
with
1,163 additions
and
393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
name: "/docker command" | ||
|
||
on: | ||
repository_dispatch: | ||
types: [ docker-command ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.client_payload.github.payload.issue.number }}-${{ github.event.client_payload.slash_command.command }}-${{ github.event.client_payload.slash_command.args.unnamed.arg1 || github.event.client_payload.slash_command.args.all }} | ||
|
||
jobs: | ||
create: | ||
if: ${{ github.event.client_payload.slash_command.args.unnamed.arg1 == 'build' }} | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 3 | ||
outputs: | ||
error-msg: ${{ steps.check-membership.outputs.error }} | ||
steps: | ||
- uses: hmarr/[email protected] | ||
|
||
- name: Check user's membership | ||
uses: actions/github-script@v7 | ||
id: check-membership | ||
env: | ||
ACTOR: ${{ github.actor }} | ||
with: | ||
github-token: ${{ secrets.GIT_PAT }} | ||
script: | | ||
const { repo, owner } = context.repo; | ||
const actor = process.env.ACTOR; | ||
const { data: membership } = await github.rest.orgs.getMembershipForUser({ | ||
org: owner, | ||
username: actor, | ||
}); | ||
if (membership.state != "active") { | ||
const error = `Unfortunately you don't have membership in ${owner} organization`; | ||
core.setOutput("error", error); | ||
core.setFailed(error); | ||
} | ||
build-docker: | ||
name: "Build" | ||
needs: | ||
- create | ||
permissions: | ||
contents: read | ||
checks: write | ||
uses: ./.github/workflows/docker-build.yml | ||
with: | ||
sha: ${{ github.event.client_payload.pull_request.head.sha || github.event.after }} | ||
branch_name: ${{ github.event.client_payload.pull_request.head.ref || github.ref_name }} | ||
secrets: inherit | ||
|
||
notification: | ||
if: always() | ||
needs: | ||
- build-docker | ||
- create | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 3 | ||
steps: | ||
- name: Add reaction to command comment on success | ||
uses: peter-evans/create-or-update-comment@v3 | ||
if: needs.build-docker.result != 'failure' | ||
with: | ||
token: ${{ secrets.GIT_PAT }} | ||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | ||
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | ||
body: | | ||
> Docker image was pushed with the tag `${{ needs.build-docker.outputs.image_version }}` | ||
> | ||
> [Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
reactions: "+1" | ||
|
||
- name: Add reaction to command comment on failure | ||
uses: peter-evans/create-or-update-comment@v3 | ||
if: needs.build-docker.result == 'failure' | ||
with: | ||
token: ${{ secrets.GIT_PAT }} | ||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | ||
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | ||
body: | | ||
> **Error**: failed to execute "${{ github.event.client_payload.slash_command.args.unnamed.arg1 }}" command | ||
> [Workflow run](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
reactions: "-1" | ||
|
||
help: | ||
if: github.event.client_payload.slash_command.args.unnamed.arg1 == 'help' | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 1 | ||
steps: | ||
- name: Update comment | ||
uses: peter-evans/create-or-update-comment@v3 | ||
with: | ||
token: ${{ secrets.GIT_PAT }} | ||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | ||
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | ||
body: | | ||
> Command | Description | ||
> --- | --- | ||
> /docker build | Build and push custom docker image | ||
reaction-type: hooray |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: "/git command" | ||
name: "/jira command" | ||
|
||
on: | ||
repository_dispatch: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,13 +23,13 @@ jobs: | |
release_tag: ${{ github.ref_name }} | ||
secrets: inherit | ||
|
||
build_ubi_docker_image: | ||
name: "Build UBI docker image" | ||
uses: ./.github/workflows/docker-build-ubi.yml | ||
with: | ||
sha: ${{ github.ref_name }} | ||
version: ${{ github.ref_name }} | ||
secrets: inherit | ||
# build_ubi_docker_image: | ||
# name: "Build UBI docker image" | ||
# uses: ./.github/workflows/docker-build-ubi.yml | ||
# with: | ||
# sha: ${{ github.ref_name }} | ||
# version: ${{ github.ref_name }} | ||
# secrets: inherit | ||
|
||
build_hugging_face_docker_image: | ||
name: "Build Hugging Face docker image" | ||
|
@@ -125,3 +125,27 @@ jobs: | |
with: | ||
docker_image_version: ${{ github.ref_name }} | ||
secrets: inherit | ||
|
||
notify_slack_on_failure: | ||
name: "Notify Slack on Failure" | ||
needs: | ||
- promote_docker_image | ||
- build_hugging_face_docker_image | ||
- build-pypi | ||
- delete-rc-assets | ||
- update-homebrew-tap | ||
- update-helm-chart | ||
runs-on: ubuntu-latest | ||
if: ${{ failure() }} | ||
steps: | ||
- name: Send Notification to Slack | ||
id: slack_notify_ops_release | ||
uses: slackapi/[email protected] | ||
with: | ||
channel-id: '${{ vars.SLACK_CH_RELEASE_TRAIN }}' | ||
slack-message: | | ||
On or more steps of Label Studio OpenSource release pipeline got failed! <!subteam^${{ vars.SLACK_GR_DEVOPS }}> | ||
><https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|[Workflow run]> | ||
env: | ||
SLACK_LSE_BOT_TOKEN: ${{ secrets.SLACK_LSE_BOT_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.