-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (61 loc) · 1.49 KB
/
auto-publish.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
65
66
name: auto-publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHACHA_KEY: ${{ secrets.CHACHA_KEY }}
CARGO_TERM_COLOR: always
permissions:
contents: write
on:
workflow_dispatch:
inputs:
addr:
description: addr
required: true
type: string
default: "0"
core:
description: core
required: true
type: number
default: 0
jobs:
cli:
runs-on: "ubuntu-latest"
outputs:
value: ${{ steps.post.outputs.value }}
ref: ${{ steps.post.outputs.ref }}
runtime: ${{ steps.post.outputs.runtime }}
steps:
-
name: Checkout
uses: actions/checkout@v3
-
run: |
sudo apt-get -qq install chromium-driver tmux
shell: bash
name: Install Chrome
-
uses: actions-rs/toolchain@v1.0.6
with:
profile: minimal
toolchain: stable
override: true
name: Install Rust
-
id: post
run: |
tmux new-session -d -s chromedriver
tmux send-keys -t chromedriver 'chromedriver --port=9515' Enter
cargo build --release
{
./target/release/cli post ${{ inputs.addr }} ${{ inputs.core }}
} >> $GITHUB_OUTPUT
shell: bash
name: Build and Run cli
publish:
needs:
- cli
uses: ./.github/workflows/bot.yml
with:
key: ${{ needs.cli.outputs.value }}
value: ${{ needs.cli.outputs.ref }}