Latest version #1088
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: Latest version | |
on: | |
schedule: | |
- cron: "30 2 * * *" | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get remote package data | |
uses: wei/curl@master | |
with: | |
args: --silent "https://pkgs.alpinelinux.org/package/edge/community/x86_64/tor" --output ./package_data.html | |
- name: Cut version from package data | |
run: | | |
remote_version=$(grep -A 3 -i version ./package_data.html | sed -E 's#.*>([0-9\.]+)-r[0-9]+</a>#\1#g' | tail -1 | sed 's/^[ \t]*//;s/[ \t]*$//') | |
echo "##[set-output name=version;]$remote_version" | |
id: package_version | |
- name: Check remote version with local | |
run: | | |
grep -q ${{ steps.package_version.outputs.version }} VERSION |