forked from vuejs-translations/ryu-cho
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathaction.yml
More file actions
100 lines (95 loc) · 3.54 KB
/
Copy pathaction.yml
File metadata and controls
100 lines (95 loc) · 3.54 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: 'Yuki-no'
description: 'Automatic git commit tracking service.'
inputs:
access-token:
description: 'GitHub access token.'
required: true
username:
description: 'Git username used for GitHub issue operations. Defaults to "github-actions".'
required: false
default: 'github-actions'
email:
description: 'Git username used for GitHub issue operations. Defaults to "action@github.com".'
required: false
default: 'action@github.com'
upstream-repo:
description: 'URL of your repository. If not specified, the current working repository will be used. e.g. https://github.com/vitejs/docs-ko.git'
required: false
head-repo:
description: 'URL of repository to track. e.g. https://github.com/vitejs/vite.git'
required: true
head-repo-branch:
description: 'Branch to track in head repo. Defaults to "main".'
required: false
default: 'main'
track-from:
description: 'Starting commit hash. Tracking starts from the next commit.'
required: true
include:
description: 'Glob patterns for files to track. If not specified, all files will be tracked.'
required: false
exclude:
description: 'Glob patterns for files to exclude. Take precedence over include patterns.'
required: false
labels:
description: 'Labels for issues. You can specify multiple labels separated by newlines. If empty string is provided, no labels will be added. Defaults to "sync".'
required: false
default: |
sync
release-tracking:
description: 'Whether to enable release tracking. When enabled, Yuki-no will track releases for each issue and add comments about release status.'
required: false
release-tracking-labels:
description: 'Labels for unreleased changes. Added to issues until changes are released. If empty string is provided, no labels will be added. Defaults to "pending". (newline separated)'
required: false
default: |
pending
verbose:
description: 'When enabled, Yuki-no will show all log messages including info and success messages. This is useful for debugging.'
required: false
default: true
runs:
using: 'composite'
steps:
- name: Set environment variables
shell: bash
run: |
echo "YUKI_NO_VERSION=${action_ref}" >> $GITHUB_ENV
env:
action_ref: ${{ github.action_ref }}
- name: Checkout Yuki-no
run: ${{ github.action_path }}/scripts/checkout.sh
shell: bash
- name: Check if first run
shell: bash
run: |
if [ "$RUN_NUMBER" = "1" ]; then
echo "MAYBE_FIRST_RUN=true" >> $GITHUB_ENV
echo "This is the first run"
else
echo "MAYBE_FIRST_RUN=false" >> $GITHUB_ENV
echo "This is not the first run"
fi
env:
RUN_NUMBER: ${{ github.run_number }}
- name: Run Yuki-no
env:
ACCESS_TOKEN: ${{ inputs.access-token }}
USER_NAME: ${{ inputs.username }}
EMAIL: ${{ inputs.email }}
UPSTREAM_REPO: ${{ inputs.upstream-repo }}
HEAD_REPO: ${{ inputs.head-repo }}
HEAD_REPO_BRANCH: ${{ inputs.head-repo-branch }}
TRACK_FROM: ${{ inputs.track-from }}
INCLUDE: ${{ inputs.include }}
EXCLUDE: ${{ inputs.exclude }}
LABELS: ${{ inputs.labels }}
RELEASE_TRACKING: ${{ inputs.release-tracking }}
RELEASE_TRACKING_LABELS: ${{ inputs.release-tracking-labels }}
VERBOSE: ${{ inputs.verbose }}
MAYBE_FIRST_RUN: ${{ env.MAYBE_FIRST_RUN }}
run: |
cd yuki-no
yarn install
yarn start
shell: bash