Check mergerfs version #174
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: Check mergerfs version | |
on: | |
schedule: | |
- cron: '0 4 * * 6' | |
jobs: | |
updateMergerfs: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install libs | |
run: sudo apt-get update && sudo apt-get install curl jq -y | |
- name: Get latest mergerfs release | |
id: mergerfs-version | |
run: | | |
echo "release_tag=$(curl -sL https://api.github.com/repos/trapexit/mergerfs/releases/latest | jq -r ".tag_name" | cut -b 1-)" >> $GITHUB_OUTPUT | |
echo "current_tag=$(<mergerfs-version.txt)" >> $GITHUB_OUTPUT | |
- name: Update mergerfs | |
if: steps.mergerfs-version.outputs.current_tag != steps.mergerfs-version.outputs.release_tag | |
env: | |
RELEASE_TAG: ${{ steps.mergerfs-version.outputs.release_tag }} | |
run: | | |
# Update current release | |
echo ${{ steps.mergerfs-version.outputs.release_tag }} > mergerfs-version.txt | |
- name: Update Readme.md & Dockerfile | |
uses: jacobtomlinson/gha-find-replace@master | |
with: | |
find: ${{ steps.mergerfs-version.outputs.current_tag }} | |
replace: ${{ steps.mergerfs-version.outputs.release_tag }} | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
commit-message: Update mergerfs-version to ${{ steps.mergerfs-version.outputs.release_tag }} | |
title: Update mergerfs-version to ${{ steps.mergerfs-version.outputs.release_tag }} | |
body: | | |
Updates [mergerfs-version][1] to ${{ steps.mergerfs-version.outputs.release_tag }} | |
Auto-generated by [create-pull-request][2] | |
[1]: https://github.com/trapexit/mergerfs | |
[2]: https://github.com/peter-evans/create-pull-request | |
labels: dependencies, automated pr | |
branch: mergerfs-updates | |
token: ${{ secrets.REPO_SCOPED_TOKEN }} |