diff --git a/.github/labels.yml b/.github/labels.yml new file mode 100644 index 00000000..bc6aeecf --- /dev/null +++ b/.github/labels.yml @@ -0,0 +1,27 @@ +- name: bug + description: Something isn't working + color: d42a34 + +- name: dependencies + description: Related with project dependencies + color: ffc0cb + +- name: documentation + description: Improvements or additions to documentation + color: 0677ba + +- name: enhancement + description: New features or code improvements + color: FFD827 + +- name: good first issue + description: Easy to solve for newcomers + color: 62ca50 + +- name: maintenance + description: Package and maintenance related + color: f78c37 + +- name: release + description: Anything related to an incoming release + color: ffffff diff --git a/.github/workflows/label.yaml b/.github/workflows/label.yaml index 06f01fc0..8602f97c 100644 --- a/.github/workflows/label.yaml +++ b/.github/workflows/label.yaml @@ -4,6 +4,9 @@ on: types: [opened, reopened, synchronize, edited, labeled] push: branches: [ main ] + paths: + - '../labels.yml' + concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -11,12 +14,22 @@ concurrency: jobs: + label-syncer: + name: Syncer + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: micnncim/action-label-syncer@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + labeler: name: Set labels permissions: contents: read pull-requests: write runs-on: ubuntu-latest + if: github.event_name == 'pull_request' steps: - name: Label based on changed files and branch name @@ -41,13 +54,13 @@ jobs: - [maintenance](https://github.com/ansys/openapi-common/pulls?q=label%3Amaintenance+) changelog-fragment: - name: "Create changelog fragment" - needs: [labeler] - permissions: - contents: write - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: ansys/actions/doc-changelog@v6 - with: - token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} \ No newline at end of file + name: "Create changelog fragment" + needs: [labeler] + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: ansys/actions/doc-changelog@v6 + with: + token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} diff --git a/doc/changelog.d/581.changed.md b/doc/changelog.d/581.changed.md new file mode 100644 index 00000000..37c0440d --- /dev/null +++ b/doc/changelog.d/581.changed.md @@ -0,0 +1 @@ +Fix labelling workflow \ No newline at end of file