File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 push :
55 branches-ignore :
66 - " main"
7+ paths-ignore :
8+ - ' README.md'
9+ - ' LICENSE'
10+ - ' CHANGELOG.md'
11+ - ' CONTRIBUTING.md'
12+ - ' LICENSE'
13+ - ' doc/**'
714
815jobs :
916 build :
1017 runs-on : ubuntu-latest
1118 steps :
1219 - name : Checkout
13- uses : actions/checkout@v3
14-
20+ uses : actions/checkout@v4
1521 - name : Set up Docker Buildx
1622 uses : docker/setup-buildx-action@v2
1723 - name : Build
Original file line number Diff line number Diff line change 1+ name : build and pull nightly docker image
2+
3+ on :
4+ push :
5+ branches :
6+ - " main"
7+ paths-ignore :
8+ - ' README.md'
9+ - ' LICENSE'
10+ - ' CHANGELOG.md'
11+ - ' CONTRIBUTING.md'
12+ - ' LICENSE'
13+ - ' doc/**'
14+
15+ jobs :
16+ build :
17+ runs-on : ubuntu-latest
18+ steps :
19+ - name : Checkout
20+ uses : actions/checkout@v4
21+ - name : Get the version
22+ id : get_version
23+ run : |
24+ VERSION=$(date +%Y%m%d)-$(git rev-parse --short=6 HEAD)-nightly
25+ echo ::set-output name=VERSION::${VERSION}
26+ - name : Write version to webapp
27+ run : echo "VITE_APP_VERSION=${{ steps.get_version.outputs.VERSION }}" >> webapp/.env.production
28+ - name : Login to Docker Hub
29+ uses : docker/login-action@v2
30+ with :
31+ username : ${{ secrets.DOCKERHUB_USERNAME }}
32+ password : ${{ secrets.DOCKERHUB_TOKEN }}
33+ - name : Set up Docker Buildx
34+ uses : docker/setup-buildx-action@v2
35+ - name : Build and push
36+ uses : docker/build-push-action@v3
37+ with :
38+ context : .
39+ file : ./Dockerfile
40+ push : true
41+ tags : " ${{ secrets.DOCKERHUB_USERNAME }}/httpymonitor:nightly"
Original file line number Diff line number Diff line change 1- name : build and pull latest or versioned docker image
1+ name : build and pull versioned and latest docker image
22
33on :
4- push :
5- branches :
6- - " main"
74 release :
85 types : [created]
96
129 runs-on : ubuntu-latest
1310 steps :
1411 - name : Checkout
15- uses : actions/checkout@v3
12+ uses : actions/checkout@v4
1613 - name : Get the version
1714 id : get_version
1815 run : |
19- VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo 'latest' )
16+ VERSION=$(git describe --tags --abbrev=0 2>/dev/null || exit 1 )
2017 echo ::set-output name=VERSION::${VERSION}
2118 - name : Write version to webapp
2219 run : echo "VITE_APP_VERSION=${{ steps.get_version.outputs.VERSION }}" >> webapp/.env.production
3330 context : .
3431 file : ./Dockerfile
3532 push : true
36- tags : " ${{ secrets.DOCKERHUB_USERNAME }}/httpymonitor:${{ steps.get_version.outputs.VERSION }}"
33+ tags : |
34+ "${{ secrets.DOCKERHUB_USERNAME }}/httpymonitor:${{ steps.get_version.outputs.VERSION }}"
35+ "${{ secrets.DOCKERHUB_USERNAME }}/httpymonitor:latest"
Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ This example:
3636- listens on port ` 8081 ` for incoming HTTP requests
3737- names the container ` httpymonitor-github-api `
3838
39+ ## Docker images versions
40+
41+ - ` nightly ` : ` smartondev/httpymonitor:nightly ` (latest)
42+ - ` x.y.z ` : ` smartondev/httpymonitor:x.y.z ` (stable)
43+ - ` latest ` : ` smartondev/httpymonitor:latest ` (latest stable)
44+
3945## Author
4046
4147[ Márton Somogyi] ( https://github.com/kamarton )
You can’t perform that action at this time.
0 commit comments