mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-29 01:58:26 +00:00
Docker: don't login without creds
This commit is contained in:
parent
b80209cb2c
commit
572b004cee
6
.github/scripts/docker-build.bash
vendored
6
.github/scripts/docker-build.bash
vendored
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
DOCKERHUB_IMAGE_ID=$DOCKERHUB_ACCOUNT/$IMAGE_NAME
|
||||
DOCKERHUB_IMAGE_ID=$DOCKERHUB_USERNAME/$IMAGE_NAME
|
||||
|
||||
# Change all uppercase to lowercase
|
||||
DOCKERHUB_IMAGE_ID=$(echo $DOCKERHUB_IMAGE_ID | tr '[A-Z]' '[a-z]')
|
||||
@ -39,7 +39,7 @@ fi
|
||||
docker buildx build \
|
||||
${push_image} \
|
||||
${image_platforms} \
|
||||
--cache-from=type=registry,ref=$DOCKERHUB_ACCOUNT/$IMAGE_NAME:$cache_tag \
|
||||
--cache-to=type=registry,ref=$DOCKERHUB_ACCOUNT/$IMAGE_NAME:$cache_tag,mode=max \
|
||||
--cache-from=type=registry,ref=$DOCKERHUB_USERNAME/$IMAGE_NAME:$cache_tag \
|
||||
--cache-to=type=registry,ref=$DOCKERHUB_USERNAME/$IMAGE_NAME:$cache_tag,mode=max \
|
||||
"${image_tags[@]}" \
|
||||
.
|
||||
|
10
.github/workflows/docker.yaml
vendored
10
.github/workflows/docker.yaml
vendored
@ -23,13 +23,12 @@ concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
IMAGE_NAME: conky
|
||||
DOCKERHUB_ACCOUNT: brndnmtthws
|
||||
DOCKER_BUILDKIT: 1
|
||||
|
||||
jobs:
|
||||
docker-buildx:
|
||||
env:
|
||||
IMAGE_NAME: conky
|
||||
DOCKER_BUILDKIT: 1
|
||||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
@ -41,6 +40,7 @@ jobs:
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
if: ${{ env.DOCKERHUB_USERNAME != '' }}
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user