forked from TommyLau/docker-ocserv
-
Notifications
You must be signed in to change notification settings - Fork 42
35 lines (32 loc) · 1.09 KB
/
ocserv-version-update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Bump ocserv version
on:
schedule:
- cron: "0 0 * * *"
jobs:
ocserv-version-update:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Update openconnect version
id: get_version
run: |
OC_VERSION=$(curl -s ftp://ftp.infradead.org/pub/ocserv/ | awk '{print $9}' | tail -n 1 | sed 's:.*-::;s:.tar.*::')
sed -i "s/ENV OC_VERSION=[0-9]*.[0-9]*.[0-9]*/ENV OC_VERSION=$OC_VERSION/g" Dockerfile
echo "OC_VERSION=$OC_VERSION" >> $GITHUB_OUTPUT
- name: Create PR
uses: peter-evans/create-pull-request@v5
with:
commit-message: "Bump ocserv version ${{ steps.get_version.outputs.OC_VERSION }}"
token: ${{ secrets.GITHUB_TOKEN }}
branch: features/update-dependencies
title: Bump ocserv version
labels: dependencies
delete-branch: true
base: master
env:
OC_VERSION: ${{ steps.get_version.outputs.OC_VERSION }}