Sets MT_VER=4 #479
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: Docker | |
# yamllint disable-line rule:truthy | |
on: | |
pull_request: | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.txt' | |
- '.*' | |
push: | |
branches: | |
- "master" | |
- "dev*" | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.txt' | |
- '.*' | |
# Sequence of patterns matched against refs/tags. | |
tags: | |
- 'v1.*' | |
release: | |
types: | |
- published | |
jobs: | |
Hadolint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: brpaz/hadolint-action@master | |
with: | |
dockerfile: Dockerfile | |
Docker: | |
runs-on: ubuntu-latest | |
needs: Hadolint | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build ubuntu-base | |
run: docker build --target ubuntu-base -t ubuntu-base . | |
- name: Build ubuntu-provisioned | |
run: docker build --target ubuntu-provisioned -t ubuntu-provisioned . | |
- name: Build ea-tester-base | |
run: docker build --target ea-tester-base -t ea-tester-base . | |
- name: Build ea-tester-with-mt4 | |
run: docker build --target ea-tester-with-mt4 -t mt4 . | |
- name: Build ea-tester-with-mt5 | |
run: docker build --target ea-tester-with-mt5 -t mt5 . | |
- name: Build ea-tester | |
run: docker build | |
--build-arg BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") | |
--build-arg VCS_REF=${GITHUB_SHA} | |
--build-arg VERSION=${GITHUB_REF} | |
--target ea-tester . | |
- run: docker images | |
- name: Print GitHub actor, repository and ref | |
run: echo "${{ github.actor }} @ ${{ github.repository }}:${{ github.ref }}" | |
- name: Push to Docker Hub | |
if: > | |
github.repository == 'EA31337/EA-Tester' | |
&& github.event_name != 'pull_request' | |
uses: docker/build-push-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
repository: ea31337/ea-tester | |
tag_with_ref: true | |
- name: Push to GitHub Packages | |
if: > | |
github.repository == 'EA31337/EA-Tester' | |
&& github.event_name != 'pull_request' | |
uses: docker/build-push-action@v1 | |
with: | |
add_git_labels: true | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
registry: docker.pkg.github.com | |
repository: ea31337/ea-tester/ea-tester | |
tag_with_ref: true | |
Test-Docker: | |
runs-on: ubuntu-latest | |
needs: Docker | |
container: | |
env: | |
OPT_TRACE: ${{ runner.debug }} | |
OPT_VERBOSE: true | |
image: ea31337/ea-tester:dev | |
volumes: | |
- ${{ github.workspace }}/scripts/tests:/opt/scripts | |
steps: | |
- run: pwd | |
- run: id | |
- run: ls -la /opt/scripts | |
# - run: scripts/eval.sh help | |
# - run: scripts/run_backtest.sh -? |