Skip to content

added small monitoring script that must keep the search container in … #83

added small monitoring script that must keep the search container in …

added small monitoring script that must keep the search container in … #83

Workflow file for this run

name: Docker Images Build & Push to ghrc.io
on:
push:
branches: ["main"]
tags: ["v*.*.*"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the codebase
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the Docker images and Push them to the registry-namespace indicated in REG_NS
run: |
touch .env # make sure we have one to satisfy the build
export REG_NS="ghcr.io/vlizbe/vocabserver-app" # sets the public scope for these, no uppercases are allowed
TAG_NAME=${GITHUB_REF#refs/tags/} # this is the tag name of the release
echo $TAG_NAME # this is the tag name of the release
# build tag is the same as tag name for releases if this matches the semver format else it is latest
# The string you want to check
# The regular expression
regex="^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\\+([0-9a-zA-Z-]+(\\.[0-9a-zA-Z-]+)*))?$"
if [[ $TAG_NAME =~ $regex ]]; then
export BUILD_TAG=$TAG_NAME
else
export BUILD_TAG="latest"
fi
echo $BUILD_TAG
make docker-push