Update docker-image.yml
This commit is contained in:
8
.github/workflows/docker-image.yml
vendored
8
.github/workflows/docker-image.yml
vendored
@@ -70,12 +70,14 @@ jobs:
|
|||||||
if: github.event.inputs.registry == 'dockerhub'
|
if: github.event.inputs.registry == 'dockerhub'
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ github.repository_owner }}
|
username: bugattiguy527
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Determine Docker image tag
|
- name: Determine Docker image tag
|
||||||
run: |
|
run: |
|
||||||
echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
|
REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')
|
||||||
|
echo "REPO_OWNER=$REPO_OWNER" >> $GITHUB_ENV
|
||||||
|
|
||||||
if [ "${{ github.event.inputs.tag_name }}" != "" ]; then
|
if [ "${{ github.event.inputs.tag_name }}" != "" ]; then
|
||||||
IMAGE_TAG="${{ github.event.inputs.tag_name }}"
|
IMAGE_TAG="${{ github.event.inputs.tag_name }}"
|
||||||
elif [ "${{ github.ref }}" == "refs/heads/main" ]; then
|
elif [ "${{ github.ref }}" == "refs/heads/main" ]; then
|
||||||
@@ -90,7 +92,7 @@ jobs:
|
|||||||
# Determine registry and image name
|
# Determine registry and image name
|
||||||
if [ "${{ github.event.inputs.registry }}" == "dockerhub" ]; then
|
if [ "${{ github.event.inputs.registry }}" == "dockerhub" ]; then
|
||||||
echo "REGISTRY=docker.io" >> $GITHUB_ENV
|
echo "REGISTRY=docker.io" >> $GITHUB_ENV
|
||||||
echo "IMAGE_NAME=$REPO_OWNER/termix" >> $GITHUB_ENV
|
echo "IMAGE_NAME=bugattiguy527/termix" >> $GITHUB_ENV
|
||||||
else
|
else
|
||||||
echo "REGISTRY=ghcr.io" >> $GITHUB_ENV
|
echo "REGISTRY=ghcr.io" >> $GITHUB_ENV
|
||||||
echo "IMAGE_NAME=$REPO_OWNER/termix" >> $GITHUB_ENV
|
echo "IMAGE_NAME=$REPO_OWNER/termix" >> $GITHUB_ENV
|
||||||
|
|||||||
Reference in New Issue
Block a user