-
-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (37 loc) · 1.04 KB
/
commit.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
on:
workflow_dispatch:
inputs:
filepath:
description: "JSON file path for the data"
type: string
required: true
filedata:
description: "Stringify JSON data of the image"
type: string
required: true
name:
description: "git config user.name"
type: string
required: true
email:
description: "git config user.email"
type: string
required: true
jobs:
process:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 17.7
- name: Run script
run: node scripts/index.js '${{ inputs.filepath }}' '${{ inputs.filedata }}'
- name: Push changes
run: |
git config user.email '${{ inputs.email }}'
git config user.name '${{ inputs.name }}'
git add .
git commit -m "Add photo from Apple shortcuts" || echo "Nothing to commit"
git fetch origin main
git push origin HEAD:main