File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Docker Publish
2+
3+ on :
4+ push :
5+ branches : [ "main" ]
6+
7+ jobs :
8+ build-and-push :
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - name : Checkout repository
13+ uses : actions/checkout@v3
14+
15+ - name : Log in to Docker Hub
16+ uses : docker/login-action@v2
17+ with :
18+ username : ${{ secrets.DOCKER_USER_LOGIN }}
19+ password : ${{ secrets.DOCKER_USER_PASSWORD }}
20+
21+ - name : Extract version from mysqltuner.pl
22+ id : version
23+ run : echo "VERSION=$(grep '\- Version ' mysqltuner.pl | awk '{ print $NF}')" >> $GITHUB_ENV
24+
25+ - name : Build and push Docker image
26+ uses : docker/build-push-action@v4
27+ with :
28+ context : .
29+ push : true
30+ tags : |
31+ jmrenouard/mysqltuner:latest
32+ jmrenouard/mysqltuner:${{ env.VERSION }}
You can’t perform that action at this time.
0 commit comments