Skip to content

Commit 334ae14

Browse files
committed
fix zizmor findings
1 parent a6081bc commit 334ae14

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/formatter-version-check.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,13 @@ on:
2121
workflow_dispatch: # Allow manual trigger
2222
pull_request:
2323

24+
concurrency:
25+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
26+
cancel-in-progress: true
27+
2428
jobs:
2529
filter:
30+
name: Filter changed files
2631
runs-on: ubuntu-latest
2732
outputs:
2833
should_run: ${{ steps.filter.outputs.should_run }}
@@ -40,22 +45,19 @@ jobs:
4045
- '.github/workflows/formatter-version-check.yaml'
4146
4247
check-formatter-version:
48+
name: Check Formatter Version
4349
needs: filter
4450
if: ${{ github.event_name == 'workflow_dispatch' || needs.filter.outputs.should_run == 'true' }}
4551
runs-on: ubuntu-latest
4652
steps:
4753
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
4854
with:
4955
persist-credentials: false
50-
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
51-
with:
52-
java-version: "17"
53-
distribution: "temurin"
5456
- name: Extract formatter version from pom.xml
5557
id: extract_pom_version
5658
shell: bash
5759
run: |
58-
version=$(mvn help:evaluate -Dexpression=google-java-format.version -q -DforceStdout -f java-shared-config/java-shared-config/pom.xml | tail -n 1 | tr -d '"')
60+
version=$(awk -F'[<>]' '/google-java-format.version/{print $3; exit}' java-shared-config/java-shared-config/pom.xml | tr -d '"')
5961
echo "version=$version" >> "$GITHUB_OUTPUT"
6062
- name: Extract formatter version from librarian.yaml
6163
id: extract_librarian_version

0 commit comments

Comments
 (0)