Skip to content

Xử lý ID

Xử lý ID #5

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 | 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