Testing again
This commit is contained in:
@@ -5,6 +5,8 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "main"
|
- "main"
|
||||||
|
paths-ignore:
|
||||||
|
- ".gitea/**"
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 * * 0"
|
- cron: "0 0 * * 0"
|
||||||
|
|
||||||
@@ -21,12 +23,35 @@ jobs:
|
|||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Check changes
|
||||||
|
id: changes
|
||||||
|
run: |
|
||||||
|
# Get the list of changed files
|
||||||
|
CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})
|
||||||
|
|
||||||
|
# Check if ONLY a specific file has changed
|
||||||
|
SPECIFIC_FILE=".gitea/commit.yaml"
|
||||||
|
if [ "$CHANGED_FILES" = "$SPECIFIC_FILE" ]; then
|
||||||
|
echo "Only the specific file has changed: $SPECIFIC_FILE"
|
||||||
|
echo "::set-output name=files_changed::false"
|
||||||
|
else
|
||||||
|
echo "Other files have changed, stopping the workflow"
|
||||||
|
echo "::set-output name=files_changed::true"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Run on specific changes
|
||||||
|
if: steps.changes.outputs.files_changed != 'true'
|
||||||
|
run: echo "Beginning build"
|
||||||
|
|
||||||
- name: Prepare the container
|
- name: Prepare the container
|
||||||
run: curl -fsSL https://get.docker.com -o get-docker.sh && sh ./get-docker.sh
|
run: curl -fsSL https://get.docker.com -o get-docker.sh && sh ./get-docker.sh
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user