Skip to content

Commit b4770a4

Browse files
authored
BREAK: remove separate taplo pre-commit workflow (#108)
1 parent a408bc5 commit b4770a4

File tree

3 files changed

+1
-112
lines changed

3 files changed

+1
-112
lines changed

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,18 @@ jobs:
2525
name: Determine skipped pre-commit hooks
2626
outputs:
2727
skipped-hooks: ${{ steps.hooks.outputs.skipped-hooks }}
28-
taplo-version: ${{ steps.taplo.outputs.taplo-version }}
2928
runs-on: ubuntu-24.04
3029
steps:
3130
- id: hooks
3231
uses: ComPWA/actions/get-skipped-pre-commit-hooks@v2
33-
- id: taplo
34-
uses: ComPWA/actions/get-pre-commit-taplo-version@v2
3532

3633
pre-commit:
3734
name: Run local pre-commit hooks
3835
env:
3936
FORCE_COLOR: 1
40-
SKIP: taplo
4137
TERM: xterm-256color
4238
UV_SYSTEM_PYTHON: 1
43-
if: >-
44-
${{ needs.determine-hooks.outputs.skipped-hooks != '' && needs.determine-hooks.outputs.skipped-hooks != 'taplo' }}
39+
if: needs.determine-hooks.outputs.skipped-hooks
4540
needs: determine-hooks
4641
runs-on: ubuntu-24.04
4742
steps:
@@ -103,45 +98,6 @@ jobs:
10398
name: pre-commit-changes
10499
path: ${{ steps.diff.outputs.diff }}
105100

106-
taplo:
107-
container:
108-
image: ghcr.io/compwa/mirrors-taplo:${{ needs.determine-hooks.outputs.taplo-version }}
109-
credentials:
110-
username: ${{ github.actor }}
111-
password: ${{ secrets.github_token }}
112-
if: needs.determine-hooks.outputs.taplo-version != ''
113-
name: Run taplo through pre-commit
114-
needs: determine-hooks
115-
runs-on: ubuntu-24.04
116-
steps:
117-
- uses: actions/checkout@v4
118-
- run: git config --global --add safe.directory $(pwd)
119-
- env:
120-
PRE_COMMIT_HOME: /root/.cache/pre-commit
121-
run: pre-commit run taplo --all-files --color always
122-
- id: diff
123-
if: always()
124-
name: Determine changed files
125-
run: |
126-
if [[ $(git diff --name-only) ]]; then
127-
some_file_in_root=$(git ls-files --directory | grep -E '^[^/]+$' | head -n1)
128-
diff_files="$some_file_in_root $(git diff --name-only)"
129-
delimiter="$(openssl rand -hex 8)"
130-
echo "diff<<${delimiter}" >> $GITHUB_OUTPUT
131-
for file in $diff_files; do
132-
echo "$file" | tee -a $GITHUB_OUTPUT
133-
done
134-
echo "${delimiter}" >> $GITHUB_OUTPUT
135-
fi
136-
# https://github.com/actions/upload-artifact/issues/174#issuecomment-934330651
137-
shell: bash
138-
- if: always() && steps.diff.outputs.diff != ''
139-
uses: actions/upload-artifact@v4
140-
with:
141-
if-no-files-found: error
142-
name: pre-commit-changes-taplo
143-
path: ${{ steps.diff.outputs.diff }}
144-
145101
push:
146102
if: >-
147103
always() &&
@@ -151,7 +107,6 @@ jobs:
151107
name: Push changes
152108
needs:
153109
- pre-commit
154-
- taplo
155110
runs-on: ubuntu-24.04
156111
steps:
157112
- uses: actions/checkout@v4

get-pre-commit-taplo-version/action.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

get-pre-commit-taplo-version/main.py

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)