Skip to content

add logging

add logging #106

Workflow file for this run

name: Docker Environment Pipeline
# on:
# workflow_dispatch:
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build-images:
name: build-images
runs-on: ubuntu-latest
env:
BUILD_MODE: release
steps:
- name: Free disk space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: false
dotnet: false
haskell: false
large-packages: true
docker-images: true
swap-storage: true
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: "true"
- name: Checkout lfs
run: |
git lfs install --local
AUTH=$(git config --local http.${{ github.server_url }}/.extraheader)
git config --local --unset http.${{ github.server_url }}/.extraheader
git config --local http.${{ github.server_url }}/${{ github.repository }}.git/info/lfs/objects/batch.extraheader "$AUTH"
git lfs pull
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.PACKAGES_TOKEN }}
- name: Get branch name
id: branch-name
uses: tj-actions/[email protected]
- name: Build and Push MetaTrader 5 Terminal image (latest) to Github Packages
if: ${{ steps.branch-name.outputs.current_branch == 'main' }}
id: mt5_build_latest
uses: docker/build-push-action@v3
with:
file: "infrastructure/MetaTrader5/Dockerfile"
context: "infrastructure/MetaTrader5/"
push: true
tags: ${{ github.repository_owner }}/metatrader5-terminal:latest,${{ github.repository_owner }}/metatrader5-terminal:${{ github.sha }},${{ github.repository_owner }}/metatrader5-terminal:${{ github.run_id }}
cache-from: type=gha
cache-to: type=gha
- name: Digest metatrader5-terminal image
run: echo ${{ steps.mt5_build_latest.outputs.digest }}
- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push MetaTrader 5 Terminal image (latest) to DockerHub
if: ${{ steps.branch-name.outputs.current_branch == 'main' }}
id: mt5_build_docker_latest
uses: docker/build-push-action@v3
with:
file: "infrastructure/MetaTrader5/Dockerfile"
context: "infrastructure/MetaTrader5/"
platforms: linux/amd64
push: true
tags: ${{ github.repository_owner }}/metatrader5-terminal:latest,${{ github.repository_owner }}/metatrader5-terminal:${{ github.sha }},${{ github.repository_owner }}/metatrader5-terminal:${{ github.run_id }}
cache-from: type=gha
cache-to: type=gha
- name: Digest metatrader5-terminal image
run: echo ${{ steps.mt5_build_docker_latest.outputs.digest }}
# - name: Build Trade Flow Environment image (latest)
# if: ${{ steps.branch-name.outputs.current_branch == 'main' }}
# id: trade_flow_env_build_latest
# uses: docker/build-push-action@v3
# with:
# context: .
# push: true
# tags: ghcr.io/${{ github.repository_owner }}/trade_flow:latest
# cache-from: type=gha
# cache-to: type=gha
# - name: Digest trade_flow image
# run: echo ${{ steps.trade_flow_env_build_latest.outputs.digest }}