-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
50 lines (45 loc) · 1.31 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
42
43
44
45
46
47
48
49
50
name: 'Generate WordPress Archive'
description: 'Generates a zip archive of a WordPress project using WP-CLI'
author: 'Linkon Miyan'
branding:
icon: 'archive'
color: 'green'
inputs:
retention-days:
description: 'How many days to keep the zip archive'
default: 3
node-version:
description: 'Which version of node do you want?'
default: 16
install-composer:
description: 'Do you want to install composer?'
default: false
npm-run-build:
description: 'Do you want to run npm build?'
default: false
runs:
using: 'composite'
steps:
- name: Use specific node version
id: node-setup
uses: actions/setup-node@v2
with:
node-version: ${{ inputs.node-version }}
- name: Running the action to generate zip archive
id: archive
run: ${{ github.action_path }}/run.sh
shell: bash
env:
INSTALL_COMPOSER: ${{ inputs.install-composer }}
NPM_RUN_BUILD: ${{ inputs.npm-run-build }}
- name: Unzip the archive
id: unzip
run: unzip wordpress.zip -d dist-archive
shell: bash
- name: Upload the archive as an artifact
id: upload
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}
path: dist-archive
retention-days: ${{ inputs.retention-days }}