Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@ on:
push:
branches-ignore:
- "main"
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'CHANGELOG.md'
- 'CONTRIBUTING.md'
- 'LICENSE'
- 'doc/**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/main-docker-pull-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: build and pull nightly docker image

on:
push:
branches:
- "main"
paths-ignore:
- 'README.md'
- 'LICENSE'
- 'CHANGELOG.md'
- 'CONTRIBUTING.md'
- 'LICENSE'
- 'doc/**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get the version
id: get_version
run: |
VERSION=$(date +%Y%m%d)-$(git rev-parse --short=6 HEAD)-nightly
echo ::set-output name=VERSION::${VERSION}
- name: Write version to webapp
run: echo "VITE_APP_VERSION=${{ steps.get_version.outputs.VERSION }}" >> webapp/.env.production
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
push: true
tags: "${{ secrets.DOCKERHUB_USERNAME }}/httpymonitor:nightly"
13 changes: 6 additions & 7 deletions .github/workflows/main-docker-pull.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: build and pull latest or versioned docker image
name: build and pull versioned and latest docker image

on:
push:
branches:
- "main"
release:
types: [created]

Expand All @@ -12,11 +9,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Get the version
id: get_version
run: |
VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo 'latest')
VERSION=$(git describe --tags --abbrev=0 2>/dev/null || exit 1)
echo ::set-output name=VERSION::${VERSION}
- name: Write version to webapp
run: echo "VITE_APP_VERSION=${{ steps.get_version.outputs.VERSION }}" >> webapp/.env.production
Expand All @@ -33,4 +30,6 @@ jobs:
context: .
file: ./Dockerfile
push: true
tags: "${{ secrets.DOCKERHUB_USERNAME }}/httpymonitor:${{ steps.get_version.outputs.VERSION }}"
tags: |
"${{ secrets.DOCKERHUB_USERNAME }}/httpymonitor:${{ steps.get_version.outputs.VERSION }}"
"${{ secrets.DOCKERHUB_USERNAME }}/httpymonitor:latest"
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ This example:
- listens on port `8081` for incoming HTTP requests
- names the container `httpymonitor-github-api`

## Docker images versions

- `nightly`: `smartondev/httpymonitor:nightly` (latest)
- `x.y.z`: `smartondev/httpymonitor:x.y.z` (stable)
- `latest`: `smartondev/httpymonitor:latest` (latest stable)

## Author

[Márton Somogyi](https://github.com/kamarton)