From 27ae37d626ca534be196bf4a0bdffa8e03a5a159 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 3 Apr 2022 13:18:28 +0100 Subject: Align action workflow filenames (#16776) --- .github/workflows/auto_tag.yaml | 33 ------------------------ .github/workflows/auto_tag.yml | 33 ++++++++++++++++++++++++ .github/workflows/format.yaml | 51 -------------------------------------- .github/workflows/format.yml | 51 ++++++++++++++++++++++++++++++++++++++ .github/workflows/format_push.yaml | 49 ------------------------------------ .github/workflows/format_push.yml | 49 ++++++++++++++++++++++++++++++++++++ 6 files changed, 133 insertions(+), 133 deletions(-) delete mode 100644 .github/workflows/auto_tag.yaml create mode 100644 .github/workflows/auto_tag.yml delete mode 100644 .github/workflows/format.yaml create mode 100644 .github/workflows/format.yml delete mode 100644 .github/workflows/format_push.yaml create mode 100644 .github/workflows/format_push.yml (limited to '.github') diff --git a/.github/workflows/auto_tag.yaml b/.github/workflows/auto_tag.yaml deleted file mode 100644 index 29e85c41ca..0000000000 --- a/.github/workflows/auto_tag.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: Essential files modified - -on: - push: - branches: - - master - paths: - - quantum/**/* - - tmk_core/**/* - - drivers/**/* - - tests/**/* - - util/**/* - - platforms/**/* - - Makefile - - '*.mk' - -jobs: - tag: - runs-on: ubuntu-latest - - # protect against those who develop with their fork on master - if: github.repository == 'qmk/qmk_firmware' - - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Bump version and push tag - uses: anothrNick/github-tag-action@1.26.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DEFAULT_BUMP: 'patch' diff --git a/.github/workflows/auto_tag.yml b/.github/workflows/auto_tag.yml new file mode 100644 index 0000000000..29e85c41ca --- /dev/null +++ b/.github/workflows/auto_tag.yml @@ -0,0 +1,33 @@ +name: Essential files modified + +on: + push: + branches: + - master + paths: + - quantum/**/* + - tmk_core/**/* + - drivers/**/* + - tests/**/* + - util/**/* + - platforms/**/* + - Makefile + - '*.mk' + +jobs: + tag: + runs-on: ubuntu-latest + + # protect against those who develop with their fork on master + if: github.repository == 'qmk/qmk_firmware' + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Bump version and push tag + uses: anothrNick/github-tag-action@1.26.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEFAULT_BUMP: 'patch' diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml deleted file mode 100644 index ba0a86aa78..0000000000 --- a/.github/workflows/format.yaml +++ /dev/null @@ -1,51 +0,0 @@ -name: PR Lint Format - -on: - pull_request: - paths: - - 'drivers/**' - - 'lib/arm_atsam/**' - - 'lib/lib8tion/**' - - 'lib/python/**' - - 'platforms/**' - - 'quantum/**' - - 'tests/**' - - 'tmk_core/**' - -jobs: - lint: - runs-on: ubuntu-latest - - container: qmkfm/qmk_cli - - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Install dependencies - run: | - pip3 install -r requirements-dev.txt - - - uses: trilom/file-changes-action@v1.2.4 - id: file_changes - with: - output: ' ' - fileOutput: ' ' - - - name: Run qmk formatters - shell: 'bash {0}' - run: | - cat ~/files_added.txt ~/files_modified.txt > ~/files_changed.txt - qmk format-c --core-only $(< ~/files_changed.txt) || true - qmk format-python $(< ~/files_changed.txt) || true - qmk format-text $(< ~/files_changed.txt) || true - - - name: Fail when formatting required - run: | - git diff - for file in $(git diff --name-only); do - echo "File '${file}' Requires Formatting" - echo "::error file=${file}::Requires Formatting" - done - test -z "$(git diff --name-only)" diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000000..ba0a86aa78 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,51 @@ +name: PR Lint Format + +on: + pull_request: + paths: + - 'drivers/**' + - 'lib/arm_atsam/**' + - 'lib/lib8tion/**' + - 'lib/python/**' + - 'platforms/**' + - 'quantum/**' + - 'tests/**' + - 'tmk_core/**' + +jobs: + lint: + runs-on: ubuntu-latest + + container: qmkfm/qmk_cli + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Install dependencies + run: | + pip3 install -r requirements-dev.txt + + - uses: trilom/file-changes-action@v1.2.4 + id: file_changes + with: + output: ' ' + fileOutput: ' ' + + - name: Run qmk formatters + shell: 'bash {0}' + run: | + cat ~/files_added.txt ~/files_modified.txt > ~/files_changed.txt + qmk format-c --core-only $(< ~/files_changed.txt) || true + qmk format-python $(< ~/files_changed.txt) || true + qmk format-text $(< ~/files_changed.txt) || true + + - name: Fail when formatting required + run: | + git diff + for file in $(git diff --name-only); do + echo "File '${file}' Requires Formatting" + echo "::error file=${file}::Requires Formatting" + done + test -z "$(git diff --name-only)" diff --git a/.github/workflows/format_push.yaml b/.github/workflows/format_push.yaml deleted file mode 100644 index 4b51213b36..0000000000 --- a/.github/workflows/format_push.yaml +++ /dev/null @@ -1,49 +0,0 @@ -name: Lint Format - -on: - push: - branches: - - master - - develop - -jobs: - lint: - runs-on: ubuntu-latest - - container: qmkfm/qmk_cli - - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Install dependencies - run: | - pip3 install -r requirements-dev.txt - - - name: Run qmk formatters - shell: 'bash {0}' - run: | - qmk format-c -a - qmk format-python -a - qmk format-text -a - git diff - - - uses: rlespinasse/github-slug-action@v3.x - - - name: Become QMK Bot - run: | - git config user.name 'QMK Bot' - git config user.email 'hello@qmk.fm' - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v3 - if: ${{ github.repository == 'qmk/qmk_firmware'}} - with: - token: ${{ secrets.QMK_BOT_TOKEN }} - delete-branch: true - branch: bugfix/format_${{ env.GITHUB_REF_SLUG }} - author: QMK Bot - committer: QMK Bot - commit-message: Format code according to conventions - title: '[CI] Format code according to conventions' diff --git a/.github/workflows/format_push.yml b/.github/workflows/format_push.yml new file mode 100644 index 0000000000..4b51213b36 --- /dev/null +++ b/.github/workflows/format_push.yml @@ -0,0 +1,49 @@ +name: Lint Format + +on: + push: + branches: + - master + - develop + +jobs: + lint: + runs-on: ubuntu-latest + + container: qmkfm/qmk_cli + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Install dependencies + run: | + pip3 install -r requirements-dev.txt + + - name: Run qmk formatters + shell: 'bash {0}' + run: | + qmk format-c -a + qmk format-python -a + qmk format-text -a + git diff + + - uses: rlespinasse/github-slug-action@v3.x + + - name: Become QMK Bot + run: | + git config user.name 'QMK Bot' + git config user.email 'hello@qmk.fm' + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v3 + if: ${{ github.repository == 'qmk/qmk_firmware'}} + with: + token: ${{ secrets.QMK_BOT_TOKEN }} + delete-branch: true + branch: bugfix/format_${{ env.GITHUB_REF_SLUG }} + author: QMK Bot + committer: QMK Bot + commit-message: Format code according to conventions + title: '[CI] Format code according to conventions' -- cgit v1.2.3