-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
41 lines (39 loc) · 1.06 KB
/
action.yml
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
name: persist-workspace
description: 'A action to persist your workspace across different jobs'
author: bissolli
branding:
icon: 'box'
color: 'green'
inputs:
action:
required: false
options:
- retrieve
- persist
artifactName:
required: false
runs:
using: "composite"
steps:
- name: Create the workspace artifact
if: ${{ inputs.action != 'retrieve' }}
shell: bash
run: tar -cf workspace.tar --exclude=workspace.tar .
- name: Upload the workspace artifact
if: ${{ inputs.action == 'persist' }}
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifactName || 'persisted-artifact' }}
path: workspace.tar
if-no-files-found: error
- name: Retrieve workspace
if: ${{ inputs.action == 'retrieve' }}
uses: actions/download-artifact@v4
with:
name: ${{ inputs.artifactName || 'persisted-artifact' }}
- name: Extract workspace
if: ${{ inputs.action == 'retrieve' }}
shell: bash
run: |
ls -lah
tar -xf workspace.tar