Skip to content

Commit 53e19d4

Browse files
author
niki
committed
debug: +
1 parent a2a2627 commit 53e19d4

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/publish-image.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Publish image
2+
on:
3+
push:
4+
branches: [ master ]
5+
6+
jobs:
7+
push_to_registries:
8+
name: Push Docker image to multiple registries
9+
runs-on: ubuntu-latest
10+
permissions:
11+
packages: write
12+
contents: read
13+
steps:
14+
- name: Check out the repo
15+
uses: actions/checkout@v3
16+
17+
# - name: Log in to Docker Hub
18+
# uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
19+
# with:
20+
# username: ${{ secrets.DOCKER_USERNAME }}
21+
# password: ${{ secrets.DOCKER_PASSWORD }}
22+
23+
- name: Log in to the Container registry
24+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
25+
with:
26+
registry: ghcr.io
27+
username: ${{ github.actor }}
28+
password: ${{ secrets.GITHUB_TOKEN }}
29+
30+
- name: Extract metadata (tags, labels) for Docker
31+
id: meta
32+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
33+
with:
34+
images: |
35+
my-docker-hub-namespace/my-docker-hub-repository
36+
ghcr.io/${{ github.repository }}
37+
38+
- name: Build and push Docker images
39+
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
40+
with:
41+
context: .
42+
push: true
43+
tags: ${{ steps.meta.outputs.tags }}
44+
labels: ${{ steps.meta.outputs.labels }}
45+
46+

0 commit comments

Comments
 (0)