Skip to content

Update software URLs #180

Update software URLs

Update software URLs #180

Workflow file for this run

name: Update software URLs
on:
workflow_dispatch:
schedule:
- cron: 42 4 * * *
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
update_urls:
runs-on: ubuntu-24.04
env:
GH_TOKEN: ${{ github.token }}
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v5
with:
ref: dev
fetch-depth: 0
- name: Switch to update_urls branch
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
if git fetch origin update_urls 2> /dev/null
then
git switch update_urls
git rebase dev
else
git checkout -b update_urls
fi
- run: bash .github/workflows/update_urls.bash
- name: Commit changes
run: |
git diff --exit-code && exit 0
git add -A
if git fetch origin update_urls 2> /dev/null
then
git commit --amend --no-edit
git push -f origin update_urls
else
git commit -m 'dietpi-software: update software URLs'
git push origin update_urls
gh pr create -B dev -H update_urls -f -l 'Upstream change'
fi