Replace use of secret for org name (#1662)

Rely on whether docker username/token is available to publish the image
to docker hub only and discard use of the secret for the org name.

Ensure org name is normalized for dockerhub.
This commit is contained in:
Darragh Bailey 2022-11-04 17:03:15 +00:00 committed by GitHub
parent e34a791b5b
commit 2444889155
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,8 @@ jobs:
echo ghcr.io/${{ github.repository_owner }}/vagrant-libvirt >> ${GITHUB_ENV}
if [[ -n "${{ secrets.DOCKERHUB_USERNAME }}" ]] && [[ ${{ github.event_name }} != pull_request* ]]
then
echo ${{ secrets.DOCKERHUB_ORGANIZATION }}/vagrant-libvirt >> ${GITHUB_ENV}
ORG_NAME=$(echo ${{ github.repository_owner }} | tr -d '-')
echo ${ORG_NAME}/vagrant-libvirt >> ${GITHUB_ENV}
fi
echo 'EOF' >> ${GITHUB_ENV}
-