refactor docker login step in actions

This commit is contained in:
Anton Pates 2023-08-18 15:22:36 +00:00
parent 47e31051d8
commit c569a20425

View file

@ -17,9 +17,12 @@ jobs:
- name: Build the Docker image - name: Build the Docker image
run: docker build . --file Dockerfile --tag ghcr.io/g-core/cert-manager-webhook-gcore:latest run: docker build . --file Dockerfile --tag ghcr.io/g-core/cert-manager-webhook-gcore:latest
- name: Log in to registry - name: Login to registry
run: echo "${{ secrets.GH_TOKEN }}" | docker login ghcr.io -u $ --password-stdin uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push the Docker image - name: Push the Docker image
run: docker push ghcr.io/g-core/cert-manager-webhook-gcore:latest run: docker push ghcr.io/g-core/cert-manager-webhook-gcore:latest