Added basic functionality

This commit is contained in:
2021-05-05 23:46:05 +02:00
parent 15f79ee8c1
commit 1772a817c2
2 changed files with 25 additions and 0 deletions

19
action.yml Normal file
View File

@@ -0,0 +1,19 @@
name: Changelog Action
description: Automatically creates a changelog for Pull Requests
author: Conrad Großer <grosserconrad@gmail.com>
runs:
using: "composite"
steps:
- name: Prettify code!
shell: bash
run: >-
${{ github.action_path }}/entrypoint.sh
env:
INPUT_HEAD_REF: ${{ github.head_ref }}
INPUT_REF: ${{ github.ref }}
branding:
icon: "activity"
color: "green"

6
entrypoint.sh Normal file
View File

@@ -0,0 +1,6 @@
#!/bin/bash
# e is for exiting the script automatically if a command fails, u is for exiting if a variable is not set
# x would be for showing the commands before they are executed
set -eux
git log --oneline --decorate $INPUT_HEAD_REF..$INPUT_REF --format=%B -n 1