-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (44 loc) · 1.47 KB
/
upgpkg-v2ray.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
39
40
41
42
43
44
45
46
47
48
49
50
name: Upgpkg V2ray SPEC Version
on:
workflow_dispatch:
push:
branches:
- v2ray
schedule:
- cron: '0 0 */1 * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: v2ray
- name: Get Current Version
run: |
CURRENT_VERSION=`grep -E '^Version:' *.spec | awk '{print $2}'`
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV
- name: Export latest v2ray version
run: |
NEW_VERSION=`curl -s https://api.github.com/repos/v2fly/v2ray-core/releases/latest | jq -r '.tag_name' | sed 's/v//g'`
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
- name: Run rpmdev-bumpspec action
if: ${{ env.CURRENT_VERSION != env.NEW_VERSION }}
uses: netoarmando/rpmdev-bumpspec-action@v1
with:
specfile: 'v2ray.spec'
new: ${{ env.NEW_VERSION }}
userstring: "zhullyb <[email protected]>"
- name: Commit changes
if: ${{ env.CURRENT_VERSION != env.NEW_VERSION }}
run: |
git config --local user.email "[email protected]"
git config --local user.name "zhullyb"
git add .
git commit -m "upgpkg: v2ray@${{ env.NEW_VERSION }}"
git push
- name: trigger copr webhook
if: ${{ env.CURRENT_VERSION != env.NEW_VERSION }}
run: |
curl -X POST ${{ secrets.COPR_HOOK_URL }}v2ray/