Skip to content

Commit

Permalink
change docker login strategy for gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
IkeHunter committed Sep 8, 2024
1 parent eb82031 commit 87e7c93
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/push-docker.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Push Docker Images
on:
pull_request:
push:
branches:
- main

Expand All @@ -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
Expand Down

0 comments on commit 87e7c93

Please sign in to comment.