diff --git a/.github/workflows/check_labels.yml b/.github/workflows/check_labels.yml index 8ce24f16b1..b128168785 100644 --- a/.github/workflows/check_labels.yml +++ b/.github/workflows/check_labels.yml @@ -1,41 +1,24 @@ name: Labels Check on: pull_request: - types: [opened, labeled, unlabeled, synchronize] + types: [opened, labeled, unlabeled, synchronize, ready_for_review] jobs: A-label-check: - if: github.base_ref == 'master' - runs-on: ubuntu-latest - steps: - - uses: danielchabr/pr-labels-checker@master - id: checkLabel - with: - hasSome: A0-core,A1-cli,A2-applibs,A3-sidechain,A4-offchain,A5-teeracle,A6-evm,A7-somethingelse - githubToken: ${{ secrets.GITHUB_TOKEN }} + uses: ./.github/workflows/label-checker.yml + with: + predefined_labels: "A0-core,A1-cli,A2-applibs,A3-sidechain,A4-offchain,A5-teeracle,A6-evm,A7-somethingelse" + B-label-check: - if: github.base_ref == 'master' - runs-on: ubuntu-latest - steps: - - uses: danielchabr/pr-labels-checker@master - id: checkLabel - with: - hasSome: B0-silent,B1-releasenotes - githubToken: ${{ secrets.GITHUB_TOKEN }} + uses: ./.github/workflows/label-checker.yml + with: + predefined_labels: "B0-silent,B1-releasenotes" + C-label-check: - if: github.base_ref == 'master' - runs-on: ubuntu-latest - steps: - - uses: danielchabr/pr-labels-checker@master - id: checkLabel - with: - hasSome: C1-low 📌,C3-medium 📣,C7-high ❗️,C9-critical ‼️ - githubToken: ${{ secrets.GITHUB_TOKEN }} + uses: ./.github/workflows/label-checker.yml + with: + predefined_labels: "C1-low 📌,C3-medium 📣,C7-high ❗️,C9-critical ‼️" + E-label-check: - if: github.base_ref == 'master' - runs-on: ubuntu-latest - steps: - - uses: danielchabr/pr-labels-checker@master - id: checkLabel - with: - hasSome: E0-breaksnothing,E3-dependencies,E5-publicapi,E6-parentchain,E8-breakseverything - githubToken: ${{ secrets.GITHUB_TOKEN }} + uses: ./.github/workflows/label-checker.yml + with: + predefined_labels: "E0-breaksnothing,E3-dependencies,E5-publicapi,E6-parentchain,E8-breakseverything" diff --git a/.github/workflows/label-checker.yml b/.github/workflows/label-checker.yml new file mode 100644 index 0000000000..c17facab91 --- /dev/null +++ b/.github/workflows/label-checker.yml @@ -0,0 +1,21 @@ +name: Label checker +on: + workflow_call: + inputs: + predefined_labels: + required: true + type: string + +jobs: + check_for_matching_labels: + runs-on: ubuntu-latest + if: github.base_ref == 'master' && ${{ !github.event.pull_request.draft }} + steps: + - name: Label check + run: | + MATCH=$(jq -cn '${{ toJSON(github.event.pull_request.labels.*.name) }} as $USER_LABELS | + ${{ toJSON(inputs.predefined_labels) }} | split(",") as $LABELS | + $USER_LABELS - ($USER_LABELS - $LABELS)') + if [[ "$MATCH" == '[]' ]]; then + exit 1 + fi diff --git a/README.md b/README.md index 6d3dbbd6a8..1a7c471a88 100755 --- a/README.md +++ b/README.md @@ -40,3 +40,6 @@ See [docker/README.md](docker/README.md) For direct calls, a worker runs a web-socket server inside the enclave. An important factor for scalability is the transaction throughput of a single worker instance, which is in part defined by the maximum number of concurrent socket connections possible. On Linux by default, a process can have a maximum of `1024` concurrent file descriptors (show by `ulimit -n`). If the web-socket server hits that limit, incoming connections will be declined until one of the established connections is closed. Permanently changing the `ulimit -n` value can be done in the `/etc/security/limits.conf` configuration file. See [this](https://linuxhint.com/permanently_set_ulimit_value/) guide for more information. +foobar +foo +bar