Skip to content

Commit

Permalink
GHA: Improves platform workflow, adds artifact input
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Feb 11, 2024
1 parent 66a1265 commit 72851fb
Showing 1 changed file with 16 additions and 31 deletions.
47 changes: 16 additions & 31 deletions .github/workflows/platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand Down

0 comments on commit 72851fb

Please sign in to comment.