-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
47 lines (43 loc) · 1.38 KB
/
action.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
name: "bookmarks in issues"
description: "When you paste a URL into an issue, set the issue's title to the page's title and the issue's body to the page's URL."
inputs:
GITHUB_TOKEN:
description: "GitHub Token"
required: true
url:
description: "web page URL"
required: true
number:
description: "issue number"
required: true
runs:
using: "composite"
steps:
- name: Install dependencies
shell: bash
run: sudo apt-get update && sudo apt-get install -y curl gzip
- name: Determine Architecture
shell: bash
run: echo "arch=$(uname -m)" >> $GITHUB_ENV
- name: Set Binary URL
shell: bash
run: |
if [ "$arch" = "aarch64" ]; then
filename=bookmarks-in-issues_Linux_arm64.tar.gz
elif [ "$arch" = "x86_64" ]; then
filename=bookmarks-in-issues_Linux_x86_64.tar.gz
fi
echo "BINARY_URL=https://github.com/hxrxchang/bookmarks-in-issues/releases/download/v0.0.5/$filename" >> $GITHUB_ENV
- name: Install bookmarks-in-issues
shell: bash
run: |
curl -L $BINARY_URL --output bookmarks-in-issues.gz
tar -xzf bookmarks-in-issues.gz
- name: Run
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
URL: ${{ inputs.url }}
NUMBER: ${{ inputs.number }}
run: |
./bookmarks-in-issues -url $URL -number $NUMBER