-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
33 lines (33 loc) · 1.11 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: Protobuffer Compile Action
description: 'A GitHub Action to compile protobuf files for golang and javascript/typescript'
branding:
icon: 'package'
color: 'yellow'
inputs:
commit_message:
description: 'Commit message for the changes'
required: true
command:
description: 'Custom protoc command to run inside the Docker container with this repository mounted to the Working Directory /app'
required: true
runs:
using: 'composite'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
- run: |
docker pull ghcr.io/valentin-kaiser/protocdock:latest
docker run --rm -v ${{ github.workspace }}:/app ghcr.io/valentin-kaiser/protocdock:latest '${{ inputs.command }}'
shell: bash
- name: Commit and push if changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "Protoc Docker Action"
git diff
git add -A
git commit -m "${{ inputs.commit_message }}" || echo "No changes to commit"
git push
shell: bash