-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (64 loc) · 1.94 KB
/
id.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Xử lý ID
on:
workflow_dispatch:
inputs:
SERIAL:
description: 'Tên serial'
required: false
default: ''
WIDGETID:
description: 'Vip id'
required: false
default: ''
WIDGETIDF:
description: 'Free id'
required: false
default: ''
WIDGETIDD:
description: 'Xoá id'
required: false
default: ''
permissions: write-all
jobs:
build:
name: 'See progress'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: 'Start process'
env:
SERIAL: ${{ inputs.SERIAL }}
WIDGETID: ${{ inputs.WIDGETID }}
WIDGETIDF: ${{ inputs.WIDGETIDF }}
WIDGETIDD: ${{ inputs.WIDGETIDD }}
run: |
# Kakathic
cd $GITHUB_WORKSPACE
if [ "$SERIAL" ] && [ "$WIDGETID" ];then
curl -s -G -L https://github.com/Zenlua/Widget/releases/download/tmp/vip.txt | tee vip.txt
echo
echo "$WIDGETID" | awk '{print "'$SERIAL'="$0}' | tee -a vip.txt
echo
fi
if [ "$WIDGETIDF" ];then
curl -s -G -L https://github.com/Zenlua/Widget/releases/download/tmp/free.txt | tee free.txt
echo
echo "$WIDGETIDF" | tee -a free.txt
echo
fi
if [ "$WIDGETIDD" ];then
[ -e "$GITHUB_WORKSPACE/vip.txt" ] || curl -s -G -L https://github.com/Zenlua/Widget/releases/download/tmp/vip.txt | tee vip.txt
echo
[ -e "$GITHUB_WORKSPACE/free.txt" ] || curl -s -G -L https://github.com/Zenlua/Widget/releases/download/tmp/free.txt | tee free.txt
echo
for vsjf in $WIDGETIDD; do
sed -i "/$vsjf/d" $GITHUB_WORKSPACE/*.txt
done
fi
- name: Upload txt
uses: softprops/action-gh-release@v2
with:
name: Tmp
tag_name: tmp
files: ./*.txt