Skip to content

Update Rsync Tag in Dockerfile #98

Update Rsync Tag in Dockerfile

Update Rsync Tag in Dockerfile #98

name: Update Rsync Tag in Dockerfile
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # Runs daily at 00:00
jobs:
update-rsync-tag:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get latest rsync tag
id: latest_tag
run: curl --silent "https://api.github.com/repos/WayneD/rsync/tags" | jq -r '.[].name' | grep -m1 -v pre | xargs -I {} echo "name=latest_tag::{}" >> "$GITHUB_OUTPUT"
- name: Update Dockerfile with latest tag
run: |
sed -i -E "s/RSYNC_TAG=[0-9\.]+/RSYNC_TAG=${{ steps.latest_tag.outputs.latest_tag }}/g" Dockerfile
- name: Create Pull Request for tag update
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Update rsync tag in Dockerfile"
title: "Update rsync tag in Dockerfile"
body: "This PR updates the rsync tag in the Dockerfile to the latest tagged version."
branch: "update-rsync-tag"
base: "master"
add-paths: "Dockerfile"
labels: "automated-update,rsync"