|
|
@ -6,8 +6,37 @@ on:
|
|
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
verify-changes:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
outputs:
|
|
|
|
|
|
|
|
build: ${{ steps.list-changes.outputs.build }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Check Out Repo
|
|
|
|
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
with:
|
|
|
|
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Get changes
|
|
|
|
|
|
|
|
id: get-changes
|
|
|
|
|
|
|
|
run: echo "files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | xargs)" >> $GITHUB_OUTPUT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: List changed files
|
|
|
|
|
|
|
|
id: list-changes
|
|
|
|
|
|
|
|
run: |
|
|
|
|
|
|
|
|
for file in ${{ steps.get-changes.outputs.files }}; do
|
|
|
|
|
|
|
|
if [[ $file == defaults/* ]] || [[ $file == fonts/* ]] || [[ $file == modules/* ]] || [[ $file == kometa.py ]] || [[ $file == requirements.txt ]] || [[ $file == .dockerignore ]] || [[ $file == Dockerfile ]] || [[ $file == Dockerfile.lxml ]] ; then
|
|
|
|
|
|
|
|
echo "$file will trigger docker build"
|
|
|
|
|
|
|
|
echo "build=true" >> $GITHUB_OUTPUT
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
echo "$file will not trigger docker build"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
docker:
|
|
|
|
docker:
|
|
|
|
|
|
|
|
needs: [verify-changes]
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
if: needs.verify-changes.outputs.build == 'true'
|
|
|
|
strategy:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
matrix:
|
|
|
|
node:
|
|
|
|
node:
|
|
|
@ -80,8 +109,8 @@ jobs:
|
|
|
|
|
|
|
|
|
|
|
|
commit-notification:
|
|
|
|
commit-notification:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: ${{ success() }}
|
|
|
|
if: ${{ success() && needs.verify-changes.outputs.build == 'true' }}
|
|
|
|
needs: [docker]
|
|
|
|
needs: [docker, verify-changes]
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
|
|
|
|
|
|
|
|
- name: Send Discord Commit Notification
|
|
|
|
- name: Send Discord Commit Notification
|
|
|
|