From 378894fbeb3cd6a0d8a4c63b50dcd6896a99209f Mon Sep 17 00:00:00 2001 From: Danilo Pantani Date: Mon, 7 Aug 2023 16:15:10 +0200 Subject: [PATCH] feat(ci): add repo organization actions (#3606) * improve CI * fix the docs label name --------- Co-authored-by: Pantani --- .github/labeler.yml | 30 ++++++++++ .github/labels.json | 72 ++++++++++++++++++++++++ .github/workflows/auto-author-assign.yml | 18 ++++++ .github/workflows/labeler.yml | 16 ++++++ .github/workflows/md-link-checker.yml | 5 ++ .github/workflows/release-binary.yml | 4 ++ .github/workflows/release-docker.yml | 5 +- .github/workflows/release-nightly.yml | 4 ++ .github/workflows/test-integration.yml | 4 ++ .github/workflows/test-lint.yml | 5 ++ .github/workflows/test-semantic.yml | 2 +- .github/workflows/test.yml | 5 ++ 12 files changed, 168 insertions(+), 2 deletions(-) create mode 100644 .github/labeler.yml create mode 100644 .github/labels.json create mode 100644 .github/workflows/auto-author-assign.yml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000000..cd4ae63eff --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,30 @@ +":robot: CI": + - .github/**/* + +":book: docs": + - assets/**/* + - docs/**/* + +":hammer: tools": + - .actions/**/* + - .scripts/**/* + +":package: packages": + - ignite/pkg/**/* + +":arrow_forward: cmd": + - ignite/cmd/**/* + +":taxi: services": + - ignite/services/**/* + +":bookmark: templates": + - ignite/templates/**/* + +":door: internal": + - ignite/config/**/* + - ignite/internal/**/* + - ignite/version/**/* + +":wrench: configs": + - * diff --git a/.github/labels.json b/.github/labels.json new file mode 100644 index 0000000000..f0452a5d96 --- /dev/null +++ b/.github/labels.json @@ -0,0 +1,72 @@ +[ + { + "name": "bug", + "color": "d73a4a", + "description": "Something isn't working" + }, + { + "name": "bug fix", + "color": "8a1d1c", + "description": "Functionality that fixes a bug" + }, + { + "name": "dependencies", + "color": "5319e7", + "description": "Update to the dependencies" + }, + { + "name": "docs", + "color": "0075ca", + "description": "Improvements or additions to documentation" + }, + { + "name": "duplicate", + "color": "cfd3d7", + "description": "This issue or pull request already exists" + }, + { + "name": "good first issue", + "color": "7057ff", + "description": "Good for newcomers" + }, + { + "name": "help wanted", + "color": "008672", + "description": "Extra attention is needed" + }, + { + "name": "breaking change", + "color": "a7327e", + "description": "Functionality that contains breaking changes" + }, + { + "name": "don't merge", + "color": "b60205", + "description": "Please don't merge this functionality temporarily" + }, + { + "name": "feature", + "color": "ffb703", + "description": "New update to Gno" + }, + { + "name": "hotfix", + "color": "003049", + "description": "Major bug fix that should be merged ASAP" + }, + { + "name": "info needed", + "color": "54eba0", + "description": "More information needed" + }, + { + "name": "question", + "color": "fbca04", + "description": "Questions about Gno" + }, + { + "name": "investigating", + "color": "8c008c", + "description": "This behavior is still being tested out" + } +] diff --git a/.github/workflows/auto-author-assign.yml b/.github/workflows/auto-author-assign.yml new file mode 100644 index 0000000000..8902a128b5 --- /dev/null +++ b/.github/workflows/auto-author-assign.yml @@ -0,0 +1,18 @@ +name: auto-author-assign + +on: + pull_request_target: + types: [ opened, reopened ] + +permissions: + pull-requests: write + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + assign-author: + runs-on: ubuntu-latest + steps: + - uses: toshimaru/auto-author-assign@v1.6.2 diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000000..c304f89f4d --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,16 @@ +name: "Pull Request Labeler" +on: +- pull_request_target + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + triage: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v4 diff --git a/.github/workflows/md-link-checker.yml b/.github/workflows/md-link-checker.yml index 074b05192c..1d2afd6a1a 100644 --- a/.github/workflows/md-link-checker.yml +++ b/.github/workflows/md-link-checker.yml @@ -8,6 +8,11 @@ on: - "**.*.md" branches: - main + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: markdown-link-check: runs-on: ubuntu-latest diff --git a/.github/workflows/release-binary.yml b/.github/workflows/release-binary.yml index 73a99be268..581ddb7efc 100644 --- a/.github/workflows/release-binary.yml +++ b/.github/workflows/release-binary.yml @@ -4,6 +4,10 @@ on: release: types: [ published ] +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: binary: runs-on: ubuntu-latest diff --git a/.github/workflows/release-docker.yml b/.github/workflows/release-docker.yml index c48ac7b7aa..286974bde1 100644 --- a/.github/workflows/release-docker.yml +++ b/.github/workflows/release-docker.yml @@ -3,11 +3,14 @@ name: Release Docker Image on: release: types: [ published ] - push: branches: - main +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: consecutiveness: runs-on: ubuntu-latest diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/release-nightly.yml index 079f30f119..32b760c999 100644 --- a/.github/workflows/release-nightly.yml +++ b/.github/workflows/release-nightly.yml @@ -8,6 +8,10 @@ on: branches: - main +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: consecutiveness: runs-on: ubuntu-latest diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index 6a867dfd41..c59a7b809c 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -7,6 +7,10 @@ on: branches: - main +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: pre-test: runs-on: ubuntu-latest diff --git a/.github/workflows/test-lint.yml b/.github/workflows/test-lint.yml index ad708cc0e4..3e4e183d3b 100644 --- a/.github/workflows/test-lint.yml +++ b/.github/workflows/test-lint.yml @@ -6,6 +6,11 @@ on: - '**.md' branches: - main + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: lint: name: Lint Go code diff --git a/.github/workflows/test-semantic.yml b/.github/workflows/test-semantic.yml index 73c3c45b0b..d41d86490f 100644 --- a/.github/workflows/test-semantic.yml +++ b/.github/workflows/test-semantic.yml @@ -11,6 +11,6 @@ jobs: semantic_pr: runs-on: ubuntu-latest steps: - - uses: amannn/action-semantic-pull-request@v1.2.0 + - uses: amannn/action-semantic-pull-request@v5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ba39b5e647..35ed17ec97 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,6 +7,11 @@ on: - '**.md' branches: - main + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + jobs: test: runs-on: ubuntu-latest