Skip to content

Commit 16e4366

Browse files
committed
added ghcr token and took out useless stuff
1 parent 101b9e9 commit 16e4366

File tree

1 file changed

+8
-13
lines changed

1 file changed

+8
-13
lines changed

.github/workflows/push-docker-image.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ jobs:
3434
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
3535
with:
3636
registry: ${{ env.REGISTRY }}
37-
username: ${{ github.actor }}
38-
password: ${{ secrets.GHCR_TOKEN }}
37+
username: ${{ secrets.USERNAME }}
38+
password: ${{ secrets.PASSOWRD }}
39+
token: ${{ secrets.GITHUB_TOKEN }}
3940

4041
# Extract metadata (tags, labels) for Docker
4142
# https://github.com/docker/metadata-action
@@ -45,15 +46,9 @@ jobs:
4546
with:
4647
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
4748

48-
# Build and push Docker image with Buildx (don't push on PR)
49+
# Push the Docker image to the registry
4950
# https://github.com/docker/build-push-action
50-
- name: Build and push Docker image
51-
id: build-and-push
52-
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
53-
with:
54-
context: .
55-
push: ${{ github.event_name != 'pull_request' }}
56-
tags: ${{ steps.meta.outputs.tags }}
57-
labels: ${{ steps.meta.outputs.labels }}
58-
cache-from: type=gha
59-
cache-to: type=gha,mode=max
51+
- name: Push Docker Image to GHCR
52+
run: |
53+
docker push ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.tags }}
54+

0 commit comments

Comments
 (0)