Skip to content

Commit

Permalink
GHA: Adds platform.yml workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Feb 11, 2024
1 parent b9daf01 commit 142e9cf
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/platform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
name: Platform

env:
ARTIFACT_NAME: ${{ inputs.artifact || 'platform' }}
VERSION: ${{ inputs.version || 5 }}

# yamllint disable-line rule:truthy
on:
pull_request:
paths:
- '.github/workflows/platform.yml'
push:
branches:
- 'master'
- '*dev*'
paths:
- '.github/workflows/platform.yml'
workflow_call:
inputs:
artifact:
default: platform
description: Artifact name
required: false
type: string
version:
default: 5
description: Version to install
type: number

jobs:
platform-linux:
name: Platform (Linux)
outputs:
workdir: ${{ github.workspace }}
runs-on: ubuntu-latest
steps:
- name: Runs playbook
uses: dawidd6/action-ansible-playbook@v2
with:
configuration: |
[defaults]
nocows = false
stdout_callback = yaml
options: |
--connection local
--inventory localhost,
--verbose
playbook: molecule/mt${{ env.VERSION }}/converge.yml
requirements: ansible/galaxy-requirements.yml
- uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: |
~/.wine/drive_c/Program Files*/**/*MT*
~/.wine/drive_c/Program Files*/**/*Meta*
timeout-minutes: 20
cleanup:
if: ${{ github.event_name != 'workflow_call' }}
name: Clean-up
needs: [platform-linux]
runs-on: ubuntu-latest
steps:
- uses: geekyeggo/delete-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}

0 comments on commit 142e9cf

Please sign in to comment.