CI/CD: Generate release changelog from commits. resolves #34

This commit is contained in:
ngosang 2021-01-10 15:39:10 +01:00
parent 69c4d9edfa
commit 6400449344
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
name: publish name: release-docker
on: on:
push: push:
@ -30,13 +30,13 @@ jobs:
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v1
- -
name: Login to DockerHub name: Login to DockerHub
uses: docker/login-action@v1 uses: docker/login-action@v1
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- -
name: Login to GitHub Container Registry name: Login to GitHub Container Registry
uses: docker/login-action@v1 uses: docker/login-action@v1
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}

View File

@ -29,7 +29,7 @@ jobs:
- name: Build changelog - name: Build changelog
id: github_changelog id: github_changelog
run: | run: |
changelog=$(git log $(git describe --tags --abbrev=0)..HEAD --no-merges --oneline) changelog=$(git log $(git tag | tail -2 | head -1)..HEAD --no-merges --oneline)
changelog="${changelog//'%'/'%25'}" changelog="${changelog//'%'/'%25'}"
changelog="${changelog//$'\n'/'%0A'}" changelog="${changelog//$'\n'/'%0A'}"
changelog="${changelog//$'\r'/'%0D'}" changelog="${changelog//$'\r'/'%0D'}"