mirror of
https://github.com/valitydev/party-management.git
synced 2024-11-06 09:15:18 +00:00
a405fce864
* TD-128: Add CI, Makefile, Dockerfile and docker-compose.yaml * Fix format and lint * Use compose test * Update erlang workflow version * Add covertool * Move to valitydev repos * Add prometheus clarification * Use compose spec instead of docker compose spec * Update .github/workflows/build-image.yaml Co-authored-by: Alexey S. <kehitt@users.noreply.github.com> * Add healthchecks to dominant and machinegun in compose file * Fix Dockerfile SERVICE arg * Try to solve mystery of alias * fix * fix * fix * Only check shumway to be healthy * Insert daemon socket * Find container * Inspect last container * Try different method to print inspect * One last try * Fix * Remove hostname from docker-compose.yaml * Check `$SERVICENAME` availability * cat envfile * Test theory * Change service name * Revert experiments * Fix healthcheck * Disable wait for health on dominant Co-authored-by: Alexey S. <kehitt@users.noreply.github.com>
51 lines
1.5 KiB
YAML
51 lines
1.5 KiB
YAML
name: Build Docker image
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: ["*"]
|
|
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Construct tags / labels for an image
|
|
id: meta
|
|
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
|
|
with:
|
|
images: |
|
|
${{ env.REGISTRY }}/${{ github.repository }}
|
|
tags: |
|
|
type=sha
|
|
|
|
# https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#setting-an-environment-variable
|
|
- name: Update environment variables
|
|
run: grep -v '^#' .env >> $GITHUB_ENV
|
|
|
|
- name: Setup Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
|
|
with:
|
|
push: ${{ github.event_name == 'push' }}
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
build-args: |
|
|
OTP_VERSION=${{ env.OTP_VERSION }}
|
|
THRIFT_VERSION=${{ env.THRIFT_VERSION }}
|
|
SERVICE_NAME=${{ env.SERVICE_NAME }}
|