Deploy MetaTrader 5 Terminal (with RPYC API) #2
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: Deploy MetaTrader 5 Terminal (with RPYC API) | |
# 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: | |
fetch-depth: 1 | |
- 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/login-action@v3.1.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.PACKAGES_TOKEN }} | |
- name: Get branch name | |
id: branch-name | |
uses: tj-actions/branch-names@v8.0.1 | |
- name: Build MetaTrader 5 Terminal image (latest) | |
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: ghcr.io/${{ github.repository_owner }}/metatrader5-terminal:latest | |
cache-from: type=gha | |
cache-to: type=gha | |
- name: Digest metatrader5-terminal image | |
run: echo ${{ steps.mt5_build_latest.outputs.digest }} |