File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 build-and-push :
1616 runs-on : ubuntu-latest
1717 permissions :
18- contents : read
18+ contents : write
1919
2020 steps :
2121 - uses : actions/checkout@v4
6464
6565 - name : Update Docker Hub description
6666 uses : peter-evans/dockerhub-description@v4
67+ continue-on-error : true
6768 with :
6869 username : ${{ secrets.DOCKERHUB_USERNAME }}
6970 password : ${{ secrets.DOCKERHUB_TOKEN }}
7071 repository : ${{ env.IMAGE_NAME }}
7172 short-description : " GAIA Linux container"
7273 readme-filepath : ./docs/docker-hub-description.md
74+
75+ - name : Create GitHub release
76+ env :
77+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
78+ run : |
79+ VERSION="v${{ steps.version.outputs.version }}"
80+ if gh release view "$VERSION" >/dev/null 2>&1; then
81+ echo "Release $VERSION already exists."
82+ exit 0
83+ fi
84+ gh release create "$VERSION" \
85+ --title "$VERSION" \
86+ --notes "Docker image published: ${{ env.IMAGE_NAME }}:${{ steps.version.outputs.version }}" \
87+ --target "${{ github.sha }}"
You can’t perform that action at this time.
0 commit comments