diff --git a/.github/workflows/platform.yml b/.github/workflows/platform.yml index eff6eb9..7563e88 100644 --- a/.github/workflows/platform.yml +++ b/.github/workflows/platform.yml @@ -14,43 +14,27 @@ on: - '.github/workflows/platform.yml' workflow_call: inputs: + artifact: + default: platform + description: Artifact name + required: false + type: string + version: + default: 5 + description: Platform version + type: number workdir: default: "${{ github.workspace }}" - description: 'Working directory' + description: Working directory required: false type: string jobs: - Install-MT4-Linux: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Installs platform - uses: dawidd6/action-ansible-playbook@v2 - with: - configuration: | - [defaults] - nocows = false - stdout_callback = yaml - directory: ${{ inputs.workdir }} - options: | - --connection local - --inventory localhost, - --verbose - playbook: molecule/mt4/converge.yml - requirements: meta/galaxy-requirements.yml - - uses: actions/upload-artifact@v4 - with: - name: platform4 - path: | - ~/.wine/drive_c/Program Files*/**/*MT* - ~/.wine/drive_c/Program Files*/**/*Meta* - timeout-minutes: 20 - Install-MT5-Linux: + Platform-Linux: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Installs platform + - name: Runs playbook uses: dawidd6/action-ansible-playbook@v2 with: configuration: | @@ -62,16 +46,17 @@ jobs: --connection local --inventory localhost, --verbose - playbook: molecule/mt5/converge.yml + playbook: molecule/mt${{ inputs.version }}/converge.yml requirements: meta/galaxy-requirements.yml - uses: actions/upload-artifact@v4 with: - name: platform5 + name: ${{ inputs.artifact }} path: | ~/.wine/drive_c/Program Files*/**/*MT* ~/.wine/drive_c/Program Files*/**/*Meta* timeout-minutes: 20 - Cleanup-MT-Linux: + Cleanup: + if: ${{ github.event_name != 'workflow_call' }} needs: - Install-MT4-Linux - Install-MT5-Linux