Skip to content

Commit

Permalink
Only run previous wildfly releases nightly jobs if changes occured
Browse files Browse the repository at this point in the history
  • Loading branch information
jfdenise committed Jan 6, 2025
1 parent 4b26083 commit 0092265
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions .github/workflows/nightly-workflow-jdk11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,25 @@ on:
required: false
default: "main"
type: string
jobs:
jobs:
check_date:
runs-on: ubuntu-latest
name: Check latest commit
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- uses: actions/checkout@v2
- name: print latest_commit
run: echo ${{ github.sha }}
- id: should_run
continue-on-error: true
name: check latest commit is less than a day
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false"
galleon-plugins-build:
name: galleon-plugins-${{ matrix.os }}-jdk${{ matrix.java }}
runs-on: ${{ matrix.os }}
needs: check_date
if: ${{ needs.check_date.outputs.should_run != 'false' }}
outputs:
galleon-plugins-version: ${{ steps.version.outputs.galleon-plugins-version }}
galleon-version: ${{ steps.version.outputs.galleon-version }}
Expand Down Expand Up @@ -59,18 +74,21 @@ jobs:
wildfly-build-and-test:
name: Linux/Windows - JDK11 and JDK17
uses: wildfly/wildfly/.github/workflows/[email protected]
needs: [check_date, galleon-plugins-build]
if: ${{ needs.check_date.outputs.should_run != 'false' }}
with:
build-arguments: '-fae -Dversion.org.jboss.galleon=${{needs.galleon-plugins-build.outputs.galleon-version}} -Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}} -Dversion.org.wildfly.plugin=5.1.0.Alpha2 -Dversion.org.wildfly.wildfly-channel-plugin=1.0.20 -Dversion.org.wildfly.bom-builder-plugin=2.0.8.Final'
java-versions: "['11', '17']"
os: "['ubuntu-latest', 'windows-latest']"
maven-repo-name: galleon-plugins-maven-repository
maven-repo-path: galleon-plugins-maven-repository.tar.gz
ref: ${{ inputs.wildfly-ref }}
needs: galleon-plugins-build

wildfly-build-and-test-galleon-layers:
name: Galleon Linux - JDK11
uses: wildfly/wildfly/.github/workflows/[email protected]
needs: [check_date, galleon-plugins-build]
if: ${{ needs.check_date.outputs.should_run != 'false' }}
with:
test-arguments: '-fae -Dts.layers -Dts.galleon'
build-arguments: '-Dversion.org.jboss.galleon=${{needs.galleon-plugins-build.outputs.galleon-version}} -Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}} -Dversion.org.wildfly.plugin=5.1.0.Alpha2 -Dversion.org.wildfly.wildfly-channel-plugin=1.0.20 -Dversion.org.wildfly.bom-builder-plugin=2.0.8.Final'
Expand All @@ -79,11 +97,12 @@ jobs:
maven-repo-name: galleon-plugins-maven-repository
maven-repo-path: galleon-plugins-maven-repository.tar.gz
ref: ${{ inputs.wildfly-ref }}
needs: galleon-plugins-build

wildfly-build-and-test-preview:
name: WildFly Preview - Linux- JDK17
uses: wildfly/wildfly/.github/workflows/[email protected]
needs: [check_date, galleon-plugins-build]
if: ${{ needs.check_date.outputs.should_run != 'false' }}
with:
test-arguments: '-fae -Dts.preview'
build-arguments: '-Dversion.org.jboss.galleon=${{needs.galleon-plugins-build.outputs.galleon-version}} -Dversion.org.wildfly.galleon-plugins=${{needs.galleon-plugins-build.outputs.galleon-plugins-version}} -Dversion.org.wildfly.plugin=5.1.0.Alpha2 -Dversion.org.wildfly.wildfly-channel-plugin=1.0.20 -Dversion.org.wildfly.bom-builder-plugin=2.0.8.Final'
Expand All @@ -92,11 +111,12 @@ jobs:
maven-repo-name: galleon-plugins-maven-repository
maven-repo-path: galleon-plugins-maven-repository.tar.gz
ref: ${{ inputs.wildfly-ref }}
needs: galleon-plugins-build

datasources-build-and-test:
name: WildFly Datasources galleon-pack build and test
runs-on: ${{ matrix.os }}
needs: [check_date, galleon-plugins-build]
if: ${{ needs.check_date.outputs.should_run != 'false' }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -129,4 +149,3 @@ jobs:
with:
name: surefire-reports-${{ matrix.os }}-${{ matrix.java }}
path: '**/surefire-reports/*.txt'
needs: galleon-plugins-build

0 comments on commit 0092265

Please sign in to comment.