chore: add common labels and annotations to pods #93
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Build Docker | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**/*.md' | |
pull_request_target: | |
branches: | |
- main | |
# workflow_dispatch will let us manually trigger the workflow from GitHub actions dashboard. | |
# See https://docs.github.com/en/free-pro-team@latest/actions/managing-workflow-runs/manually-running-a-workflow | |
workflow_dispatch: | |
jobs: | |
build-on-linux: | |
runs-on: ubuntu-latest | |
name: Build and run Docker images | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{github.event.pull_request.head.ref}} | |
repository: ${{github.event.pull_request.head.repo.full_name}} | |
fetch-depth: 0 | |
- name: Build with Gradle | |
uses: hypertrace/github-actions/gradle@main | |
with: | |
args: dockerBuildImages | |
- name: Verify kafka-zookeeper image | |
working-directory: ./.github/workflows/kafka-zookeeper | |
# Below tests a docker-compose.yml service named 'sut' with a valid HEALTHCHECK instruction: | |
run: | | |
docker-compose up -d | |
while status="$(docker inspect --format="{{if .Config.Healthcheck}}{{print .State.Health.Status}}{{end}}" "$(docker-compose ps -q sut)")"; do | |
case $status in | |
starting) sleep 1;; | |
healthy) exit 0;; | |
unhealthy) exit 1;; | |
esac | |
done | |
exit 1 |