-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (33 loc) · 1.43 KB
/
check-quiche-release.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
36
37
38
name: Check Quiche release
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
get-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Get Quiche Release
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
set -x
LAST_TAG=$(gh release view -R cloudflare/quiche --json tagName --jq '.tagName')
echo $LAST_TAG
CURRENT_QUICHE_VERSION=$(grep -A1 "## Current quiche version" README.md|grep -v "## Current quiche version")
echo $CURRENT_QUICHE_VERSION
if [ $LAST_TAG != $CURRENT_QUICHE_VERSION ] ; then
ISSUE_TITLE="Bump Quiche $LAST_TAG"
if gh issue list --search "$ISSUE_TITLE" --json title | jq -e ". == []" ; then
echo "current quiche version $CURRENT_QUICHE_VERSION is not the same as last tag $LAST_TAG create issue"
gh issue create -t "$ISSUE_TITLE" -b "Bump Quiche version from $CURRENT_QUICHE_VERSION to $LAST_TAG https://github.com/cloudflare/quiche/releases/tag/$LAST_TAG"
else
echo "current quiche version $CURRENT_QUICHE_VERSION is not the same as last tag $LAST_TAG but issue exist"
fi
else
echo "current quiche version $CURRENT_QUICHE_VERSION is same as last tag $LAST_TAG"
fi