From 49e1e2b24cc2c3189e0e920ea629715902efffb5 Mon Sep 17 00:00:00 2001 From: flameshikari Date: Wed, 25 Oct 2023 20:58:52 +0500 Subject: [PATCH] run the wrapper on pull requests to check for conflicts/etc. --- .github/workflows/conflicts_check.yml | 27 ++++++++++++++++++++++++ resources/utilities/add_icons_wrapper.py | 3 +++ 2 files changed, 30 insertions(+) create mode 100644 .github/workflows/conflicts_check.yml diff --git a/.github/workflows/conflicts_check.yml b/.github/workflows/conflicts_check.yml new file mode 100644 index 0000000000..b69f36f095 --- /dev/null +++ b/.github/workflows/conflicts_check.yml @@ -0,0 +1,27 @@ +name: Conflicts Check +run-name: ${{ inputs.release_type }} @ ${{ github.sha }} + +on: + push: + paths: + - 'resources\utilities\icons\**' + - 'resources\new_icons.yaml' + pull_request: + paths: + - 'resources\utilities\icons\**' + - 'resources\new_icons.yaml' + +jobs: + build: + name: Conflicts Check + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v3 + + - name: Install dependencies + run: sudo pip install -r resources/utilities/requirements.txt + + - name: Add new icons + run: python -u resources/utilities/add_icons_wrapper.py -D diff --git a/resources/utilities/add_icons_wrapper.py b/resources/utilities/add_icons_wrapper.py index 764cce5a7e..7c0259ee04 100644 --- a/resources/utilities/add_icons_wrapper.py +++ b/resources/utilities/add_icons_wrapper.py @@ -3,6 +3,7 @@ from os import system as execute from os import name as platform from os.path import abspath, basename, dirname, realpath +from sys import argv from yaml import safe_load as yaml @@ -57,6 +58,8 @@ print(f'Issues with the next icons: {", ".join(errors)}') exit(1) + if argv[1] == '-D': exit(0) + for icon in icons: drawable = icon[0] compinfos = ' '.join(icon[1])