Fishing #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Fishing | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 */10 * * *" | |
jobs: | |
fishing: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: fishing | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
repository: "mangkoyla/LatinaSub" | |
- name: Get secrets | |
run: | | |
echo ${{ secrets.BOT_TOKEN }} > ./bot_token | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
cache: "npm" | |
- name: Setup Golang with cache | |
uses: magnetikonline/action-golang-cache@v3 | |
with: | |
go-version: ~1.20 | |
- name: Install binaries | |
run: | | |
mkdir ./bin | |
curl "https://github.com/tindy2013/subconverter/releases/download/v0.7.2/subconverter_linux64.tar.gz" -L -o ./bin/subconverter.tar.gz | |
go install -v -tags with_grpc github.com/sagernet/sing-box/cmd/sing-box@latest | |
cp /home/runner/go/bin/sing-box ./bin/ | |
tar -xf ./bin/subconverter.tar.gz -C ./bin | |
rm -rf ./bin/subconverter.tar.gz | |
sudo chmod +x ./bin/* | |
- name: Start Fishing | |
run: | | |
npm install && npm start | |
- name: Publish Result | |
if: ${{ success() }} | |
uses: EndBug/add-and-commit@v9 | |
with: | |
add: '["./result --force", "./sub_list.json --force"]' | |
default_author: github_actions | |
fetch: false | |
tag_push: "--force" | |
message: "Update Accounts" |