Skip to content

Commit 6cbba5d

Browse files
authored
fix(ci): Change setup command for auto-update-tools.yml (#5392)
1 parent 410aca5 commit 6cbba5d

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/auto-update-tools.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ on:
1111
schedule:
1212
- cron: "0 0 * * *"
1313
workflow_dispatch:
14+
pull_request:
15+
paths:
16+
- ".github/workflows/auto-update-tools.yml"
17+
- "Brewfile*"
18+
- "Makefile"
19+
- "scripts/.clang-format-version"
20+
- "scripts/.swiftlint-version"
21+
- ".pre-commit-config.yaml"
1422

1523
# Permissions configuration:
1624
# - 'contents: write' is required to allow the workflow to commit changes to the repository
@@ -45,8 +53,7 @@ jobs:
4553
run: brew update
4654

4755
- name: Install Tools
48-
run: |
49-
make init
56+
run: make init
5057

5158
- name: Update tooling versions
5259
run: make update-versions
@@ -61,6 +68,7 @@ jobs:
6168
6269
- name: Create pull request for clang-format version
6370
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e #v7.0.8
71+
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
6472
with:
6573
add-paths: scripts/.clang-format-version
6674
branch: github-actions/auto-update-tools-clang-format
@@ -72,6 +80,7 @@ jobs:
7280

7381
- name: Create pull request for swiftlint version
7482
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e #v7.0.8
83+
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
7584
with:
7685
add-paths: scripts/.swiftlint-version
7786
branch: github-actions/auto-update-tools-swiftlint

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ init-local:
99
rbenv install --skip-existing
1010
rbenv exec gem update bundler
1111
rbenv exec bundle install
12+
13+
# Install the tools needed to update tooling versions locally
14+
$(MAKE) init-ci-format
1215
./scripts/update-tooling-versions.sh
1316

1417
.PHONY: init-ci-build

0 commit comments

Comments
 (0)