File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Docker image
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ branches :
6
+ - master
7
+ defaults :
8
+ run :
9
+ shell : bash
10
+
11
+ jobs :
12
+ push_to_registry :
13
+ name : Push Docker image to Docker Hub
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - name : Check out the repo
17
+ uses : actions/checkout@v4
18
+ - name : Docker meta
19
+ id : meta
20
+ uses : docker/metadata-action@v5
21
+ with :
22
+ images : |
23
+ klement/sqlite3-to-mysql
24
+ ghcr.io/${{ github.repository }}
25
+ - name : Log in to Docker Hub
26
+ uses : docker/login-action@v3
27
+ with :
28
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
29
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
30
+ - name : Log in to the Container registry
31
+ uses : docker/login-action@v3
32
+ with :
33
+ registry : ghcr.io
34
+ username : ${{ github.actor }}
35
+ password : ${{ secrets.GITHUB_TOKEN }}
36
+ - name : Build and push
37
+ uses : docker/build-push-action@v5
38
+ with :
39
+ context : .
40
+ push : true
41
+ tags : ${{ steps.meta.outputs.tags }}
42
+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments