-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathaction.yml
35 lines (34 loc) · 910 Bytes
/
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
# action.yml
name: "action-sync"
description: "sync file to organization all repositories"
author: myml
branding:
icon: align-center
color: "white"
inputs:
files:
description: "config files"
required: false
files-from:
description: "read config list from file"
required: false
default: ".file_does_not_exist_336fcd84573cf94d21ec"
message:
description: "commit message"
required: false
default: "chore: Sync by .github"
runs:
using: "composite"
steps:
- uses: actions/setup-go@v2
with:
go-version: ^1.17.1
- name: Install binary
shell: bash
run: |
cd $GITHUB_ACTION_PATH
go build
- name: Sync
shell: bash
run: |
(cat "${{ inputs.files-from }}" || echo "${{ inputs.files }}") | xargs -d ' ' -i sh -c '$GITHUB_ACTION_PATH/action-sync -files="{}" -message="${{ inputs.message }}" || exit 255'