Skip to content

GHA: Updates if condition for clean-up #6

GHA: Updates if condition for clean-up

GHA: Updates if condition for clean-up #6

Workflow file for this run

---
name: Platform
env:
ARTIFACT_NAME: ${{ inputs.artifact || 'platform' }}
CHECKOUT_REF: ${{ inputs.ref || 'dev' }}
REPOSITORY: EA31337/EA-Tester
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
ref:
default: dev
description: The branch, tag or SHA to checkout.
required: false
type: string
version:
default: 5
description: Version to install
type: number
jobs:
platform-linux:
name: Platform ${{ env.VERSION }} (Linux)

Check failure on line 40 in .github/workflows/platform.yml

View workflow run for this annotation

GitHub Actions / Platform

Invalid workflow file

The workflow is not valid. .github/workflows/platform.yml (Line: 40, Col: 11): Unrecognized named-value: 'env'. Located at position 1 within expression: env.VERSION .github/workflows/platform.yml (Line: 71, Col: 9): Unrecognized named-value: 'undefined'. Located at position 24 within expression: github.event.inputs == undefined
outputs:
workdir: ${{ github.workspace }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.CHECKOUT_REF }}
repository: ${{ env.REPOSITORY }}
- name: Runs playbook
uses: dawidd6/action-ansible-playbook@v2
with:
configuration: |
[defaults]
nocows = false
stdout_callback = yaml
directory: ansible
options: |
--connection local
--inventory localhost,
--verbose
playbook: install-mt${{ env.VERSION }}.yml
requirements: 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.inputs == undefined }}
name: Clean-up
needs: [platform-linux]
runs-on: ubuntu-latest
steps:
- uses: geekyeggo/delete-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}