mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-30 16:32:50 -05:00
distro: Break the loop
This commit is contained in:
25
.github/workflows/run-obs.yml
vendored
25
.github/workflows/run-obs.yml
vendored
@@ -134,7 +134,20 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ steps.generate_token.outputs.token }}
|
token: ${{ steps.generate_token.outputs.token }}
|
||||||
|
|
||||||
|
- name: Check if last commit was automated
|
||||||
|
id: check-loop
|
||||||
|
run: |
|
||||||
|
LAST_COMMIT_MSG=$(git log -1 --pretty=%B | head -1)
|
||||||
|
if [[ "$LAST_COMMIT_MSG" == "ci: Auto-update PPA packages"* ]] || [[ "$LAST_COMMIT_MSG" == "ci: Auto-update OBS packages"* ]]; then
|
||||||
|
echo "⏭️ Last commit was automated ($LAST_COMMIT_MSG), skipping to prevent infinite loop"
|
||||||
|
echo "skip=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "✅ Last commit was not automated, proceeding"
|
||||||
|
echo "skip=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Determine packages to update
|
- name: Determine packages to update
|
||||||
|
if: steps.check-loop.outputs.skip != 'true'
|
||||||
id: packages
|
id: packages
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" =~ ^refs/tags/ ]]; then
|
if [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" =~ ^refs/tags/ ]]; then
|
||||||
@@ -153,7 +166,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Update dms-git spec version
|
- name: Update dms-git spec version
|
||||||
if: contains(steps.packages.outputs.packages, 'dms-git') || steps.packages.outputs.packages == 'all'
|
if: steps.check-loop.outputs.skip != 'true' && (contains(steps.packages.outputs.packages, 'dms-git') || steps.packages.outputs.packages == 'all')
|
||||||
run: |
|
run: |
|
||||||
# Get commit info for dms-git versioning
|
# Get commit info for dms-git versioning
|
||||||
COMMIT_HASH=$(git rev-parse --short=8 HEAD)
|
COMMIT_HASH=$(git rev-parse --short=8 HEAD)
|
||||||
@@ -172,7 +185,7 @@ jobs:
|
|||||||
sed -i "/%changelog/a\\$CHANGELOG_ENTRY" distro/opensuse/dms-git.spec
|
sed -i "/%changelog/a\\$CHANGELOG_ENTRY" distro/opensuse/dms-git.spec
|
||||||
|
|
||||||
- name: Update Debian dms-git changelog version
|
- name: Update Debian dms-git changelog version
|
||||||
if: contains(steps.packages.outputs.packages, 'dms-git') || steps.packages.outputs.packages == 'all'
|
if: steps.check-loop.outputs.skip != 'true' && (contains(steps.packages.outputs.packages, 'dms-git') || steps.packages.outputs.packages == 'all')
|
||||||
run: |
|
run: |
|
||||||
# Get commit info for dms-git versioning
|
# Get commit info for dms-git versioning
|
||||||
COMMIT_HASH=$(git rev-parse --short=8 HEAD)
|
COMMIT_HASH=$(git rev-parse --short=8 HEAD)
|
||||||
@@ -217,7 +230,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Update dms stable version
|
- name: Update dms stable version
|
||||||
if: steps.packages.outputs.version != ''
|
if: steps.check-loop.outputs.skip != 'true' && steps.packages.outputs.version != ''
|
||||||
run: |
|
run: |
|
||||||
VERSION="${{ steps.packages.outputs.version }}"
|
VERSION="${{ steps.packages.outputs.version }}"
|
||||||
VERSION_NO_V="${VERSION#v}"
|
VERSION_NO_V="${VERSION#v}"
|
||||||
@@ -265,11 +278,13 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
|
if: steps.check-loop.outputs.skip != 'true'
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: "1.24"
|
go-version: "1.24"
|
||||||
|
|
||||||
- name: Install OSC
|
- name: Install OSC
|
||||||
|
if: steps.check-loop.outputs.skip != 'true'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y osc
|
sudo apt-get install -y osc
|
||||||
@@ -286,6 +301,7 @@ jobs:
|
|||||||
chmod 600 ~/.config/osc/oscrc
|
chmod 600 ~/.config/osc/oscrc
|
||||||
|
|
||||||
- name: Upload to OBS
|
- name: Upload to OBS
|
||||||
|
if: steps.check-loop.outputs.skip != 'true'
|
||||||
env:
|
env:
|
||||||
FORCE_REBUILD: ${{ github.event_name == 'workflow_dispatch' && 'true' || '' }}
|
FORCE_REBUILD: ${{ github.event_name == 'workflow_dispatch' && 'true' || '' }}
|
||||||
REBUILD_RELEASE: ${{ github.event.inputs.rebuild_release }}
|
REBUILD_RELEASE: ${{ github.event.inputs.rebuild_release }}
|
||||||
@@ -305,6 +321,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Get changed packages
|
- name: Get changed packages
|
||||||
|
if: steps.check-loop.outputs.skip != 'true'
|
||||||
id: changed-packages
|
id: changed-packages
|
||||||
run: |
|
run: |
|
||||||
# Check if there are any changes to commit
|
# Check if there are any changes to commit
|
||||||
@@ -323,7 +340,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Commit packaging changes
|
- name: Commit packaging changes
|
||||||
if: steps.changed-packages.outputs.has_changes == 'true'
|
if: steps.check-loop.outputs.skip != 'true' && steps.changed-packages.outputs.has_changes == 'true'
|
||||||
run: |
|
run: |
|
||||||
git config user.name "dms-ci[bot]"
|
git config user.name "dms-ci[bot]"
|
||||||
git config user.email "dms-ci[bot]@users.noreply.github.com"
|
git config user.email "dms-ci[bot]@users.noreply.github.com"
|
||||||
|
|||||||
20
.github/workflows/run-ppa.yml
vendored
20
.github/workflows/run-ppa.yml
vendored
@@ -96,13 +96,27 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
token: ${{ steps.generate_token.outputs.token }}
|
token: ${{ steps.generate_token.outputs.token }}
|
||||||
|
|
||||||
|
- name: Check if last commit was automated
|
||||||
|
id: check-loop
|
||||||
|
run: |
|
||||||
|
LAST_COMMIT_MSG=$(git log -1 --pretty=%B | head -1)
|
||||||
|
if [[ "$LAST_COMMIT_MSG" == "ci: Auto-update PPA packages"* ]] || [[ "$LAST_COMMIT_MSG" == "ci: Auto-update OBS packages"* ]]; then
|
||||||
|
echo "⏭️ Last commit was automated ($LAST_COMMIT_MSG), skipping to prevent infinite loop"
|
||||||
|
echo "skip=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "✅ Last commit was not automated, proceeding"
|
||||||
|
echo "skip=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
|
if: steps.check-loop.outputs.skip != 'true'
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: "1.24"
|
go-version: "1.24"
|
||||||
cache: false
|
cache: false
|
||||||
|
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
|
if: steps.check-loop.outputs.skip != 'true'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y \
|
sudo apt-get install -y \
|
||||||
@@ -115,6 +129,7 @@ jobs:
|
|||||||
dpkg-dev
|
dpkg-dev
|
||||||
|
|
||||||
- name: Configure GPG
|
- name: Configure GPG
|
||||||
|
if: steps.check-loop.outputs.skip != 'true'
|
||||||
env:
|
env:
|
||||||
GPG_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
GPG_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
run: |
|
run: |
|
||||||
@@ -123,6 +138,7 @@ jobs:
|
|||||||
echo "DEBSIGN_KEYID=$GPG_KEY_ID" >> $GITHUB_ENV
|
echo "DEBSIGN_KEYID=$GPG_KEY_ID" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Determine packages to upload
|
- name: Determine packages to upload
|
||||||
|
if: steps.check-loop.outputs.skip != 'true'
|
||||||
id: packages
|
id: packages
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ github.event_name }}" == "schedule" ]]; then
|
if [[ "${{ github.event_name }}" == "schedule" ]]; then
|
||||||
@@ -136,6 +152,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Upload to PPA
|
- name: Upload to PPA
|
||||||
|
if: steps.check-loop.outputs.skip != 'true'
|
||||||
run: |
|
run: |
|
||||||
PACKAGES="${{ steps.packages.outputs.packages }}"
|
PACKAGES="${{ steps.packages.outputs.packages }}"
|
||||||
REBUILD_RELEASE="${{ github.event.inputs.rebuild_release }}"
|
REBUILD_RELEASE="${{ github.event.inputs.rebuild_release }}"
|
||||||
@@ -191,6 +208,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Get changed packages
|
- name: Get changed packages
|
||||||
|
if: steps.check-loop.outputs.skip != 'true'
|
||||||
id: changed-packages
|
id: changed-packages
|
||||||
run: |
|
run: |
|
||||||
# Check if there are any changelog changes to commit
|
# Check if there are any changelog changes to commit
|
||||||
@@ -208,7 +226,7 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Commit changelog changes
|
- name: Commit changelog changes
|
||||||
if: steps.changed-packages.outputs.has_changes == 'true'
|
if: steps.check-loop.outputs.skip != 'true' && steps.changed-packages.outputs.has_changes == 'true'
|
||||||
run: |
|
run: |
|
||||||
git config user.name "dms-ci[bot]"
|
git config user.name "dms-ci[bot]"
|
||||||
git config user.email "dms-ci[bot]@users.noreply.github.com"
|
git config user.email "dms-ci[bot]@users.noreply.github.com"
|
||||||
|
|||||||
Reference in New Issue
Block a user