Skip to content
This repository has been archived by the owner on Oct 10, 2021. It is now read-only.

Commit

Permalink
feat(ci): Test generating changelog in Actions workflow (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottBrenner authored Oct 12, 2020
1 parent ce16f34 commit 27337a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
- name: Docker run
run: docker run --entrypoint generate-changelog generate-changelog-action --version

- name: Test generating changelog
run: docker run -e REPO=${{ github.repository }} generate-changelog-action

lint:
# Name the Job
name: Lint Code Base
Expand Down
8 changes: 6 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,21 @@

git clone --quiet https://github.com/$REPO &> /dev/null

if [ "$REPO" == "ScottBrenner/generate-changelog-action" ]; then
cd generate-changelog-action
fi

if [ "$1" ] && [ "$1" != "package.json" ]; then
cp "$1" package.json
fi

tag=$(git tag --sort version:refname | tail -n 2 | head -n 1)
changelog=$(generate-changelog -t "$tag" --file -)

echo $changelog

changelog="${changelog//'%'/'%25'}"
changelog="${changelog//$'\n'/'%0A'}"
changelog="${changelog//$'\r'/'%0D'}"

echo $changelog

echo "::set-output name=changelog::$changelog"

0 comments on commit 27337a6

Please sign in to comment.