From 1772a817c2b371e8516dd14aadc246a25c3c736c Mon Sep 17 00:00:00 2001 From: Conrad Date: Wed, 5 May 2021 23:46:05 +0200 Subject: [PATCH] Added basic functionality --- action.yml | 19 +++++++++++++++++++ entrypoint.sh | 6 ++++++ 2 files changed, 25 insertions(+) create mode 100644 action.yml create mode 100644 entrypoint.sh diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..ab49f51 --- /dev/null +++ b/action.yml @@ -0,0 +1,19 @@ +name: Changelog Action +description: Automatically creates a changelog for Pull Requests + +author: Conrad Großer + +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" diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..480370e --- /dev/null +++ b/entrypoint.sh @@ -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