Files
nextcloud/.github/workflows/watchtower-update.yml
T
xhon-pelushi e1e4b69bb7 Improve dependency-update PR titles/links and exclude Helm chart PRs from release notes
- Nextcloud and watchtower dependency update PRs now include the
  new version in the title and a link to the corresponding
  upstream release notes in the PR body.
- Helm chart update PRs no longer carry the 'dependencies' label,
  so they are no longer grouped into the 'Updated dependencies'
  release notes section (they are a downstream packaging change,
  not an upstream dependency bump).

Fixes #8538

Signed-off-by: xhon-pelushi <xhon@pelushi.com>
2026-08-12 19:30:05 -04:00

44 lines
1.9 KiB
YAML

name: watchtower-update
on:
workflow_dispatch:
schedule:
- cron: '00 12 * * *'
jobs:
watchtower-update:
name: update watchtower
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Run watchtower-container-update
id: watchtower_update
run: |
# Watchtower
watchtower_version="$(
git ls-remote https://github.com/nicholas-fedor/watchtower v* \
| cut -d/ -f3 \
| sort -V \
| grep -E "^v[0-9\.]+$" \
| tail -1
)"
watchtower_commit_hash="$(git ls-remote https://github.com/nicholas-fedor/watchtower $watchtower_version | sed 's/refs.*//')"
sed -i "s|^ENV WATCHTOWER_COMMIT_HASH.*$|ENV WATCHTOWER_COMMIT_HASH=$watchtower_commit_hash|" ./Containers/watchtower/Dockerfile
sed -i "s|\$WATCHTOWER_COMMIT_HASH.*$|\$WATCHTOWER_COMMIT_HASH # $watchtower_version|" ./Containers/watchtower/Dockerfile
echo "watchtower_version=$watchtower_version" >> "$GITHUB_OUTPUT"
- name: Create Pull Request
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: watchtower-update automated change
signoff: true
title: watchtower container update to ${{ steps.watchtower_update.outputs.watchtower_version }}
body: |
Automated watchtower container update to version ${{ steps.watchtower_update.outputs.watchtower_version }}.
See the [Watchtower ${{ steps.watchtower_update.outputs.watchtower_version }} release notes](https://github.com/nicholas-fedor/watchtower/releases/tag/${{ steps.watchtower_update.outputs.watchtower_version }}) for details.
labels: dependencies, 3. to review
milestone: next
branch: watchtower-container-update