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 : image-ci
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+ tags :
8+ - v*
9+
10+ jobs :
11+ build-push-tags :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout repository
15+ uses : actions/checkout@v3
16+ - name : Docker meta
17+ id : meta
18+ uses : docker/metadata-action@v4
19+ with :
20+ images : harxhitttt/image-ci
21+ tags : |
22+ type=ref,name=short
23+ type=ref,event=tag
24+ - name : Log in to Docker Hub
25+ uses : docker/login-action@v2
26+ with :
27+ username : ${{ secrets.DOCKER_USERNAME }}
28+ password : ${{ secrets.DOCKER_PASSWORD }}
29+ - name : Build and push image
30+ uses : docker/build-push-action@v5
31+ with :
32+ context : ../development-workflow/api-node
33+ file : ./Dockerfile.2
34+ push : true
35+ tags : ${{ steps.meta.outputs.tags }}
36+ - name : Run test on image
37+ run : |
38+ docker run --rm harxhitttt/image-ci:latest node -v
You can’t perform that action at this time.
0 commit comments