Skip to content

Commit

Permalink
Do not build images if there are no changes to Docker sources
Browse files Browse the repository at this point in the history
  • Loading branch information
gionn committed Mar 28, 2024
1 parent 78caa05 commit 5287317
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
name: Build
name: Build images

on:
push:
paths:
- 'Dockerfile'
- '.dockerignore'
- '.github/workflows/main.yml'
schedule:
- cron: '12 2 * * MON'

Expand All @@ -14,18 +18,9 @@ env:
IMAGE_REPOSITORY: alfresco-base-java

jobs:
pre-commit:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@ba4451e4bd397a963027ba0f7ca4752a27b68689 # v5.21.0
with:
auto-commit: "true"
build:
name: Java ${{ matrix.java_major }} on ${{ matrix.base_image.flavor }}:${{ matrix.base_image.major }}
runs-on: ubuntu-latest
needs: pre-commit
strategy:
fail-fast: ${{ github.ref_name == 'master' && false || true }}
matrix:
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Pre-commit

on:
push:

jobs:
pre-commit:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: Alfresco/alfresco-build-tools/.github/actions/pre-commit@ba4451e4bd397a963027ba0f7ca4752a27b68689 # v5.21.0
with:
auto-commit: "true"

0 comments on commit 5287317

Please sign in to comment.