Skip to content

Commit aea5ee2

Browse files
committed
fixed GHRC workflow
1 parent 333352e commit aea5ee2

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/ghrc.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Create and publish a Docker image
1+
name: Publish Docker image (GHRC)
22

33
on:
44
push:
@@ -7,9 +7,10 @@ on:
77
env:
88
REGISTRY: ghcr.io
99
IMAGE_NAME: ${{ github.repository }}
10+
USERNAME: ${{ github.actor }}
1011

1112
jobs:
12-
build-and-push-image:
13+
push_to_registry_ghrc:
1314
runs-on: ubuntu-latest
1415
permissions:
1516
contents: read
@@ -22,19 +23,21 @@ jobs:
2223
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
2324
with:
2425
registry: ${{ env.REGISTRY }}
25-
username: ${{ github.actor }}
26+
username: ${{ env.USERNAME }}
2627
password: ${{ secrets.TOKEN }}
2728

2829
- name: Extract metadata (tags, labels) for Docker
2930
id: meta
3031
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
3132
with:
32-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
33+
tags: type=raw,value=latest
34+
images: ${{ env.REGISTRY }}/${{ env.USERNAME }}/${{ env.IMAGE_NAME }}
3335

3436
- name: Build and push Docker image
3537
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
3638
with:
3739
context: .
40+
file: Dockerfile
3841
push: true
3942
tags: ${{ steps.meta.outputs.tags }}
4043
labels: ${{ steps.meta.outputs.labels }}

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cSpell.words": [
33
"DOCKERHUB",
4+
"ghrc",
45
"github"
56
]
67
}

0 commit comments

Comments
 (0)