automation

This commit is contained in:
2023-08-18 17:02:53 +02:00
commit 33b7e1dd6d
119 changed files with 13464 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
name: "Process Test State"
description: "Check, tar and upload test state"
inputs:
artifact-name:
description: "Name of the artifact"
required: true
default: "test_state_artifact"
test-state-path:
description: "Path of the test state directory"
required: true
default: "/home/runner/test_state"
runs:
using: "composite"
steps:
- name: Check if test_state directory exists
id: check-test-state
run: |
if [ -d "${{ inputs.test-state-path }}" ]; then
echo "exists=true" >> $GITHUB_ENV
else
echo "exists=false" >> $GITHUB_ENV
fi
shell: bash
- name: Tar state
run: |
find ${{ inputs.test-state-path }} -type f -o -type d | tar -czf ${{ inputs.test-state-path }}.tar.gz -T -
shell: bash
if: env.exists == 'true'
- name: Upload test_state as artifact
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifact-name }}
path: ${{ inputs.test-state-path }}.tar.gz
if: env.exists == 'true'