File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,15 +17,24 @@ jobs:
1717 registry : ghcr.io
1818 username : ${{ github.actor }}
1919 password : ${{ secrets.GITHUB_TOKEN }}
20+
2021 - name : Get version from ChangeLog
2122 id : changelog
2223 run : |
2324 VERSION=$(grep -E '^## \[[0-9]+\.[0-9]+\.[0-9]+\]' CHANGELOG.md | head -n 1 | sed -E 's/^## \[([0-9]+\.[0-9]+\.[0-9]+)\].*/\1/')
2425 echo "VERSION=$VERSION"
2526 echo "VERSION=$VERSION" >> $GITHUB_ENV
2627 echo "::set-output name=version::$VERSION"
28+
29+ - name : Lowercase repository owner
30+ id : repo_owner
31+ run : |
32+ REPO_OWNER_LOWER=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')
33+ echo "REPO_OWNER_LOWER=$REPO_OWNER_LOWER" >> $GITHUB_ENV
34+ echo "::set-output name=repo_owner_lower::$REPO_OWNER_LOWER"
35+
2736 - name : Build Docker image
28- run : docker build -t ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ steps.changelog.outputs.version }} .
37+ run : docker build -t ghcr.io/${{ steps.repo_owner.outputs.repo_owner_lower }}/${{ github.event.repository.name }}:${{ steps.changelog.outputs.version }} .
2938
3039 - name : Push Docker image
3140 run : docker push ghcr.io/${{ github.repository }}/gitops-intro:${{ steps.changelog.outputs.version }}
You can’t perform that action at this time.
0 commit comments