From 6c55d7f8a8800291fd98ef6a24bb7eae9168a36a Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Sat, 9 Mar 2024 17:36:39 +0100 Subject: [PATCH] Automate labeling and ci conditional execution --- .github/labeler.yaml | 14 ++++++++++++++ .github/workflows/backend.yaml | 3 +++ .github/workflows/frontend.yml | 7 +++++-- .github/workflows/labeler.yml | 14 ++++++++++++++ 4 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 .github/labeler.yaml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler.yaml b/.github/labeler.yaml new file mode 100644 index 000000000..4b4716878 --- /dev/null +++ b/.github/labeler.yaml @@ -0,0 +1,14 @@ +ci: + - changed-files: + - any-glob-to-any-file: + - .github/** + +frontend: + - changed-files: + - any-glob-to-any-file: + - frontend/** + +backend: + - changed-files: + - any-glob-to-any-file: + - backend/** diff --git a/.github/workflows/backend.yaml b/.github/workflows/backend.yaml index ae91a6c0a..55f507470 100644 --- a/.github/workflows/backend.yaml +++ b/.github/workflows/backend.yaml @@ -7,6 +7,9 @@ on: pull_request: branches: - main + paths: + - "backend/**" + - ".github/workflows/**" env: CARGO_TERM_COLOR: always diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 381580f70..9923c0179 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -7,13 +7,16 @@ on: pull_request: branches: - main + paths: + - "frontend/**" + - ".github/workflows/**" env: CI: true jobs: - test: - name: test + ci: + name: ci runs-on: ubuntu-latest defaults: run: diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 000000000..fbef26fc4 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,14 @@ +name: "pull request labeler" +on: + - pull_request_target + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 + with: + configuration-path: .github/labeler.yaml \ No newline at end of file