Skip to content

Commit 04cda42

Browse files
fix: rework build/push cycle for docker image
1 parent 108794b commit 04cda42

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

.github/workflows/release.yaml

+13-7
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,18 @@ jobs:
4949
token: ${{ steps.generate-github-token.outputs.token }}
5050

5151
- name: Build Docker image
52-
run: docker build -t ghcr.io/${{ github.repository }}:${{ github.ref }} .
52+
run: docker build -t ghcr.io/${{ github.repository }}:${{ github.ref_name }} .
5353

54-
- name: Log in to GitHub Container Registry
55-
run: echo ${{ secrets.GH_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
56-
env:
57-
GH_TOKEN: '${{ steps.generate-github-token.outputs.token }}'
54+
- name: Login to GitHub Container Registry
55+
uses: docker/login-action@v3
56+
with:
57+
registry: ghcr.io
58+
username: ${{ github.actor }}
59+
password: ${{ steps.generate-github-token.outputs.token }}
5860

59-
- name: Push Docker image
60-
run: docker push ghcr.io/${{ github.repository }}/yamldifftool:${{ github.ref }}
61+
- name: Build and push
62+
uses: docker/build-push-action@v6
63+
with:
64+
context: .
65+
push: true
66+
tags: ghcr.io/jessesimpson36/yamldiff:${{ github.ref_name }}

0 commit comments

Comments
 (0)