Commit 19a12ea 1 parent fa1b241 commit 19a12ea Copy full SHA for 19a12ea
File tree 1 file changed +58
-0
lines changed
1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Push to Docker Hub
2
+
3
+ on :
4
+ push :
5
+ branches : [ main ]
6
+ jobs :
7
+ build :
8
+ runs-on : ubuntu-latest
9
+ steps :
10
+ - name : Remove unnecessary packages
11
+ run : |
12
+ echo "=== Before pruning ==="
13
+ df -h
14
+ sudo rm -rf /usr/share/dotnet
15
+ sudo rm -rf /usr/local/lib/android
16
+ sudo rm -rf /opt/ghc
17
+ echo "=== After pruning ==="
18
+ df -h
19
+
20
+ # Link to discussion: https://github.com/orgs/community/discussions/25678
21
+
22
+ - name : Checkout
23
+ uses : actions/checkout@v3
24
+ - name : Docker meta
25
+ id : meta
26
+ uses : crazy-max/ghaction-docker-meta@v2
27
+ with :
28
+ images : |
29
+ primeintellect/genesys
30
+ tags : |
31
+ type=ref,event=branch
32
+ type=ref,event=pr
33
+ type=semver,pattern={{version}}
34
+ type=semver,pattern={{major}}.{{minor}}
35
+ type=semver,pattern={{major}}
36
+ type=sha,prefix=commit-
37
+
38
+ - name : Set up Docker Buildx
39
+ id : buildx
40
+ uses : docker/setup-buildx-action@v1
41
+
42
+ - name : Login to Docker Hub
43
+ if : github.event_name != 'pull_request'
44
+ uses : docker/login-action@v1
45
+ with :
46
+ username : ${{ secrets.DOCKER_HUB_USERNAME }}
47
+ password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
48
+
49
+ - name : Build and push
50
+ id : docker_build
51
+ uses : docker/build-push-action@v2
52
+ with :
53
+ context : .
54
+ push : ${{ github.event_name != 'pull_request' }}
55
+ tags : ${{ steps.meta.outputs.tags }}
56
+
57
+ - name : Image digest
58
+ run : echo ${{ steps.docker_build.outputs.digest }}
You can’t perform that action at this time.
0 commit comments