forked from linux-kdevops/linux-fork-for-kpd
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (52 loc) · 1.59 KB
/
kdevops-cleanup.yml
File metadata and controls
60 lines (52 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# SPDX-License-Identifier: GPL-2.0
#
# This can be used towards the end of your action. All tasks here run even if
# any of the previous tasks failed.
name: Kdevops cleanup workflow
on:
workflow_call: # Makes this workflow reusable
jobs:
cleanup:
name: Archive results and cleanup
runs-on: [self-hosted, Linux, X64]
steps:
- name: Set Linux kdevops development path
if: ${{ job.status != 'cancelled' }}
run: echo "LINUX_KDEVOPS_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- name: Get systemd journal files
if: ${{ job.status != 'cancelled' }}
run: |
if [[ ! -d kdevops ]]; then
exit 0
fi
cd kdevops
make journal-dump
- name: Start SSH Agent
if: ${{ job.status != 'cancelled' }}
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Build our kdevops archive results
if: ${{ job.status != 'cancelled' }}
run: |
if [[ ! -d kdevops ]]; then
exit 0
fi
cd kdevops
make ci-archive
- name: Upload our kdevops results archive
if: ${{ job.status != 'cancelled' }}
uses: actions/upload-artifact@v4
with:
name: kdevops-ci-results
path: ${{ env.LINUX_KDEVOPS_PATH }}/kdevops/archive/*.zip
- name: Run kdevops make destroy
if: always()
run: |
if [[ ! -d kdevops ]]; then
exit 0
fi
cd kdevops
make destroy
cd ..
rm -rf kdevops