File tree Expand file tree Collapse file tree 2 files changed +53
-1
lines changed Expand file tree Collapse file tree 2 files changed +53
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Docker image
2
+
3
+ on :
4
+ workflow_call :
5
+ defaults :
6
+ run :
7
+ shell : bash
8
+ permissions : read-all
9
+
10
+ jobs :
11
+ push_to_registry :
12
+ name : Push Docker image to Docker Hub
13
+ runs-on : ubuntu-latest
14
+ environment :
15
+ name : docker
16
+ url : https://hub.docker.com/r/klement/mysql-to-sqlite
17
+ steps :
18
+ - name : Check out the repo
19
+ uses : actions/checkout@v4
20
+ - name : Docker meta
21
+ id : meta
22
+ uses : docker/metadata-action@v5
23
+ with :
24
+ images : |
25
+ klement/mysql-to-sqlite
26
+ ghcr.io/${{ github.repository }}
27
+ tags : |
28
+ type=ref,event=branch
29
+ type=ref,event=pr
30
+ type=semver,pattern={{version}}
31
+ type=semver,pattern={{major}}.{{minor}}.{{patch}}
32
+ - name : Log in to Docker Hub
33
+ uses : docker/login-action@v3
34
+ with :
35
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
36
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
37
+ - name : Log in to the Container registry
38
+ uses : docker/login-action@v3
39
+ with :
40
+ registry : ghcr.io
41
+ username : ${{ github.actor }}
42
+ password : ${{ secrets.GITHUB_TOKEN }}
43
+ - name : Build and push
44
+ uses : docker/build-push-action@v5
45
+ with :
46
+ context : .
47
+ tags : ${{ steps.meta.outputs.tags }}
48
+ labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 89
89
if : ${{ always() }}
90
90
run : |
91
91
rm -rf dist
92
- rm -rf $CHANGELOG_PATH
92
+ rm -rf $CHANGELOG_PATH
93
+ docker :
94
+ needs : build-and-publish
95
+ uses : ./.github/workflows/docker.yml
96
+ secrets : inherit
You can’t perform that action at this time.
0 commit comments