File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and Release Docker Image
2+
3+ on :
4+ release :
5+ types : [created]
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Checkout repo
12+ uses : actions/checkout@v3
13+
14+ - name : Set up docker Buildx
15+ uses : docker/setup-buildx-action@v2
16+
17+ - name : Docker-hub account login
18+ uses : docker/login-action@v2
19+ with :
20+ username : ${{ secrets.DOCKER_USERNAME }}
21+ password : ${{ secrets.DOCKER_PASSWORD }}
22+
23+ - name : Extract release tag
24+ id : meta
25+ run : echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
26+
27+ - name : Build and push Docker image
28+ uses : docker/build-push-action@v3
29+ with :
30+ context : .
31+ file : Dockerfile
32+ push : true
33+ tags : |
34+ ${{ secrets.DOCKER_USERNAME }}/nexumdb:latest
35+ ${{ secrets.DOCKER_USERNAME }}/nexumdb:${{ steps.meta.outputs.version }}
36+ ${{ secrets.DOCKER_USERNAME }}/nexumdb:${{ github.sha }}
37+ cache-from : type=registry,ref=${{ secrets.DOCKER_USERNAME }}/nexumdb:buildcache
38+ cache-to : type=registry,ref=${{ secrets.DOCKER_USERNAME }}/nexumdb:buildcache,mode=max
You can’t perform that action at this time.
0 commit comments