Skip to content

Xử lý ID

Xử lý ID #7

Workflow file for this run

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 | sed "/Not Found/d" | tee vip.txt
echo
echo "$WIDGETID" | tr ' ' '\n' | 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 | sed "/Not Found/d" | tee free.txt
echo
echo "$WIDGETIDF" | tr ' ' '\n' | 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 | sed "/Not Found/d" | tee vip.txt
echo
[ -e "$GITHUB_WORKSPACE/free.txt" ] || curl -s -G -L https://github.com/Zenlua/Widget/releases/download/tmp/free.txt | sed "/Not Found/d" | tee free.txt
echo
for vsjf in $WIDGETIDD; do
sed -i "/$vsjf/d" $GITHUB_WORKSPACE/*.txt
done
cat $GITHUB_WORKSPACE/*.txt
fi
- name: Upload txt
uses: softprops/action-gh-release@v2
with:
name: Tmp
tag_name: tmp
files: ./*.txt