Skip to content

Check Latest OpenVPN Version #986

Check Latest OpenVPN Version

Check Latest OpenVPN Version #986

Workflow file for this run

name: Check Latest OpenVPN Version
on:
schedule:
- cron: '0 6,18 * * *'
workflow_dispatch:
jobs:
version_check:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
- name: Get the latest version of OpenVPN
run: |
OPENVPN_VERSION_TAG=$(curl -fsSL https://api.github.com/repos/openvpn/openvpn/git/refs/tags|jq -r .[].ref|cut -d"/" -f3|grep -E -ve "alpha|beta|branch|rc|RC"|sort -V|tail -n1|sed "s/v//g")
if ! [ -z "${OPENVPN_VERSION_TAG}" ]; then
if curl -fsSL http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/ | grep "openvpn-${OPENVPN_VERSION_TAG}"; then
echo "${OPENVPN_VERSION_TAG}" > version
echo "{\"version\":\"${OPENVPN_VERSION_TAG}\"}" > manifest.json
echo "OPENVPN_VERSION=$(cat version)" >> $GITHUB_ENV
fi
fi
- name: Add & Commit
uses: EndBug/[email protected]
with:
message: 'Version updated to: ${{ env.OPENVPN_VERSION }}'