Skip to content

Commit

Permalink
ci: Separate Gradle Wrapper validation into its own workflow
Browse files Browse the repository at this point in the history
Sometimes gradle wrapper validation fails due to network issues.
By separating the wrapper validation into its own workflow, we can
easily rerun the failed workflow without rerunning all the longer
running workflows.

Signed-off-by: BJ Hargrave <bj@hargrave.dev>
  • Loading branch information
bjhargrave committed May 10, 2022
1 parent dc001b1 commit 6509426
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 30 deletions.
24 changes: 10 additions & 14 deletions .github/workflows/cibuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@ on:
push:
branches-ignore:
- 'dependabot/**'
paths-ignore:
- 'docs/**'
- '.github/**/*docs*'
- '.github/**/*codeql*'
- '.github/**/*rebuild*'
- '.github/*.yml'
paths:
- '**'
- '!docs/**'
- '!.github/**'
- '.github/**/*ci*'
pull_request:
paths-ignore:
- 'docs/**'
- '.github/**/*docs*'
- '.github/**/*codeql*'
- '.github/**/*rebuild*'
- '.github/*.yml'
paths:
- '**'
- '!docs/**'
- '!.github/**'
- '.github/**/*ci*'

env:
LC_ALL: en_US.UTF-8
Expand Down Expand Up @@ -62,8 +60,6 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: ${{ matrix.fetch-depth }}
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v3
with:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v3
with:
Expand Down
24 changes: 10 additions & 14 deletions .github/workflows/rebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@ on:
push:
branches-ignore:
- 'dependabot/**'
paths-ignore:
- 'docs/**'
- '.github/**/*docs*'
- '.github/**/*codeql*'
- '.github/**/*ci*'
- '.github/*.yml'
paths:
- '**'
- '!docs/**'
- '!.github/**'
- '.github/**/*rebuild*'
pull_request:
paths-ignore:
- 'docs/**'
- '.github/**/*docs*'
- '.github/**/*codeql*'
- '.github/**/*ci*'
- '.github/*.yml'
paths:
- '**'
- '!docs/**'
- '!.github/**'
- '.github/**/*rebuild*'

env:
LC_ALL: en_US.UTF-8
Expand Down Expand Up @@ -50,8 +48,6 @@ jobs:
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Set up Java ${{ matrix.java }}
uses: actions/setup-java@v3
with:
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/wrapper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: 'Wrapper'

on:
push:
branches-ignore:
- 'dependabot/**'
paths:
- 'gradle/wrapper/**'
- 'gradlew*'
- '.github/**/*wrapper*'
pull_request:
paths:
- 'gradle/wrapper/**'
- 'gradlew*'
- '.github/**/*wrapper*'

env:
LC_ALL: en_US.UTF-8

defaults:
run:
shell: bash

permissions:
contents: read

jobs:
validate:
name: Validate Gradle Wrapper
runs-on: 'ubuntu-latest'
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1

0 comments on commit 6509426

Please sign in to comment.