From e5ca7380512cb61909cf0e2b80b26e297b181133 Mon Sep 17 00:00:00 2001 From: Stilian Boyadzhiev Date: Thu, 29 May 2025 20:47:10 +0300 Subject: [PATCH] add secrets reference for docker hub --- .github/workflows/docker-build-hell.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-build-hell.yml b/.github/workflows/docker-build-hell.yml index 06f9af541f..5b62c5e7b3 100644 --- a/.github/workflows/docker-build-hell.yml +++ b/.github/workflows/docker-build-hell.yml @@ -36,7 +36,7 @@ jobs: file: ./Dockerfile # Path to the Dockerfile if not root platforms: linux/amd64 # Add ,linux/arm64 if you need multi-arch push: true # Change to false to keep image local to runner - tags: go-etherium-satan:latest + tags: ${{ secrets.DOCKERHUB_USERNAME }}/go-etherium-satan:latest ci-build-manual: if: github.event_name == 'workflow_dispatch' @@ -50,12 +50,19 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - # Build (and optionally push) the image + # 4) Log in to Docker Hub – store secrets in repo → Settings → Secrets and variables → Actions + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + # 5) Build (and optionally push) the image - name: Build and push image uses: docker/build-push-action@v5 with: context: . file: ./Dockerfile # Path to the Dockerfile if not root platforms: linux/amd64 # Add ,linux/arm64 if you need multi-arch - push: false # Change to false to keep image local to runner - tags: go-etherium-satan:latest + push: true # Change to false to keep image local to runner + tags: ${{ secrets.DOCKERHUB_USERNAME }}/go-etherium-satan:latest