Update Rsync Tag in Dockerfile #109
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |