Skip to content

Commit 8e81ff2

Browse files
helenJasonTheAdams
authored andcommitted
Try initial move into a composite action
1 parent ba9f9b6 commit 8e81ff2

3 files changed

Lines changed: 11 additions & 26 deletions

File tree

Dockerfile

Lines changed: 0 additions & 10 deletions
This file was deleted.

action.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
name: 'WordPress Plugin Deploy'
22
description: 'Deploy to the WordPress Plugin Repository'
33
author: '10up'
4+
branding:
5+
icon: 'upload-cloud'
6+
color: 'blue'
47
inputs:
58
generate-zip:
69
description: 'Generate package zip file?'
710
default: false
811
runs:
9-
using: 'docker'
10-
image: 'Dockerfile'
11-
args:
12-
- ${{ inputs.generate-zip }}
13-
branding:
14-
icon: 'upload-cloud'
15-
color: 'blue'
12+
using: 'composite'
13+
steps:
14+
- id: deploy
15+
env:
16+
INPUT_GENERATE_ZIP: ${{ inputs.generate-zip }}
17+
run: ${{ github.action_path }}/deploy.sh
18+
shell: bash

entrypoint.sh renamed to deploy.sh

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@ if [[ -z "$SVN_PASSWORD" ]]; then
2020
exit 1
2121
fi
2222

23-
# Set variables
24-
GENERATE_ZIP=false
25-
26-
# Set options based on user input
27-
if [ -z "$1" ]; then
28-
GENERATE_ZIP=$1;
29-
fi
30-
3123
# Allow some ENV variables to be customized
3224
if [[ -z "$SLUG" ]]; then
3325
SLUG=${GITHUB_REPOSITORY#*/}
@@ -131,7 +123,7 @@ svn status
131123
echo "➤ Committing files..."
132124
svn commit -m "Update to version $VERSION from GitHub" --no-auth-cache --non-interactive --username "$SVN_USERNAME" --password "$SVN_PASSWORD"
133125

134-
if ! $GENERATE_ZIP; then
126+
if ! $INPUT_GENERATE_ZIP; then
135127
echo "Generating zip file..."
136128
mv "${SVN_DIR}/trunk" "${SVN_DIR}/${SLUG}"
137129
cd $SVN_DIR

0 commit comments

Comments
 (0)