From 87e7c93a5fa791cc5d2f857ac789cc924895603e Mon Sep 17 00:00:00 2001 From: Isaac Hunter Date: Sun, 8 Sep 2024 17:57:40 -0400 Subject: [PATCH] change docker login strategy for gh actions --- .github/workflows/push-docker.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/push-docker.yml b/.github/workflows/push-docker.yml index 03cac8a..66d0cf7 100644 --- a/.github/workflows/push-docker.yml +++ b/.github/workflows/push-docker.yml @@ -1,6 +1,6 @@ name: Push Docker Images on: - pull_request: + push: branches: - main @@ -11,12 +11,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - name: Login to Docker - run: | - echo "$DOCKER_PASS" | docker login $DOCKER_REGISTRY --username $DOCKER_USER --password-stdin - env: - DOCKER_PASS: ${{ secrets.DOCKER_REGISTRY_PASS }} - DOCKER_USER: ${{ secrets.DOCKER_REGISTRY_USER }} - DOCKER_REGISTRY: ${{ vars.DOCKER_REGISTRY }} + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_REGISTRY_USER }} + password: ${{ secrets.DOCKER_REGISTRY_PASS }} - name: Build and Push Images run: | docker buildx create --use