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