-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathaction.yml
33 lines (33 loc) · 1.01 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
name: 'ActionServerless'
description: Use GitHub Actions to create a serverless service
inputs:
filepath: # id of input
description: 'A file path where to read source code'
required: false
write_mode:
description: 'Output write mode(overwrite/append)'
required: false
default: 'overwrite'
runs:
using: "composite"
steps:
- id: run-funcs
run: |
export GITFX_WRITE_MODE=${{ inputs.write_mode }}
python3 -m pip install gitfx
python3 -m gitfx ${{ inputs.filepath }}
shell: bash
- name: Git commit
run: |
# git commit if there's any change
if test -n "$(git status --porcelain 2>/dev/null)"; then
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "Add changes"
git push origin ${GITHUB_REF##*/}
fi
shell: bash
branding:
icon: 'cloud-lightning'
color: 'purple'