Skip to content

Commit

Permalink
feat: update dockerhub description
Browse files Browse the repository at this point in the history
resolves #34
  • Loading branch information
kelly-sovacool committed Oct 23, 2024
1 parent ac71881 commit 280ceac
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/build-docker-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,16 @@ jobs:
- name: Prepare build-time variables
id: vars
run: |
if [ ! -f ${{ github.event.inputs.dockerfile }} ] ; then
echo "ERROR: Dockerfile not found: ${{ github.event.inputs.dockerfile }}"
exit 1
fi
echo "CONTEXT=$(dirname ${{ github.event.inputs.dockerfile }})" >> "$GITHUB_OUTPUT"
echo "DATE=$(date +"%Y-%m-%d")" >> "$GITHUB_OUTPUT"
$ for Docker Hub Description
echo " # ${{ github.repository }} ${{ github.event.inputs.image_name }}\n" > tmp_README.md
echo "Dockerfile source: https://github.com/${{ github.repository }}/blob/${{ github.sha }}/${{ github.event.inputs.dockerfile }}\n" >> tmp_README.md
- name: Build and push
uses: docker/build-push-action@v4
with:
Expand All @@ -54,3 +62,11 @@ jobs:
BUILD_DATE=${{ steps.vars.outputs.DATE }}
BUILD_TAG=${{ github.event.inputs.version }}
REPONAME=${{ github.event.inputs.image_name }}
- name: Update Docker Hub Description
if: ${{ github.event.inputs.push == 'true' }}
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: peterevans/dockerhub-description
readme-filepath: tmp_README.md

0 comments on commit 280ceac

Please sign in to comment.