Skip to content

adjust wrapping for collapsible block #44

adjust wrapping for collapsible block

adjust wrapping for collapsible block #44

name: Update Inotify Version
on:
push:
branches:
- docs
jobs:
update_version:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Ensure inotify_version file exists
run: |
if [ ! -f "docs/inotify_version" ]; then
touch docs/inotify_version
fi
- name: Get latest Inotify version
id: get_latest_version
run: |
latest_version=$(curl -s https://api.github.com/repos/inotify-tools/inotify-tools/releases/latest | grep "tag_name" | sed -E 's/.*"([^"]+)".*/\1/')
echo "::set-output name=latest_version::$latest_version"
- name: Read inotify_version content
id: read_inotify_version
run: |
current_version=$(cat docs/inotify_version)
echo "::set-output name=current_version::$current_version"
- name: Compare versions
id: compare_versions
run: |
if [ "${{ steps.read_inotify_version.outputs.current_version }}" = "${{ steps.get_latest_version.outputs.latest_version }}" ]; then
echo "::set-output name=push_required::false"
else
echo "::set-output name=push_required::true"
fi
- name: Commit and push changes
if: steps.compare_versions.outputs.push_required == 'true'
run: |
echo "${{ steps.get_latest_version.outputs.latest_version }}" > docs/inotify_version
git config --global user.email "github-actions@example.com"
git config --global user.name "GitHub Actions"
git add docs/inotify_version
git commit -m "Update Inotify version"
git push