Skip to content

Commit

Permalink
Add more version
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesChou committed Apr 4, 2019
1 parent 2093b25 commit 97ad329
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 4 deletions.
14 changes: 11 additions & 3 deletions .github/main.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,22 @@ workflow "Test the Phalcon Actions" {
]
}

action "Test the Phalcon commands" {
uses = "./"
action "Test the Phalcon with PHP 7.3 commands" {
uses = "./7.3"
args = "i"
}

action "Test the Phalcon with PHP 7.2 commands" {
uses = "./7.2"
args = "i"
}

action "Send Discord message" {
needs = ["Test the Phalcon commands"]
uses = "appleboy/discord-action@master"
needs = [
"Test the Phalcon with PHP 7.3 commands",
"Test the Phalcon with PHP 7.2 commands",
]
secrets = [
"WEBHOOK_ID",
"WEBHOOK_TOKEN",
Expand Down
17 changes: 17 additions & 0 deletions 7.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM mileschou/phalcon:7.2

LABEL "repository"="https://github.com/MilesChou/phalcon-action"
LABEL "homepage"="https://github.com/MilesChou/phalcon-action"
LABEL "maintainer"="MilesChou <[email protected]>"

LABEL "com.github.actions.name"="Phalcon Action"
LABEL "com.github.actions.description"="An action for running project with Phalcon framework environment"
LABEL "com.github.actions.icon"="code"
LABEL "com.github.actions.color"="green"

# Install the devtools
RUN docker-phalcon-install-devtools

COPY phalcon-dev-entrypoint /usr/local/bin/phalcon-dev-entrypoint

ENTRYPOINT ["/usr/local/bin/phalcon-dev-entrypoint"]
33 changes: 33 additions & 0 deletions 7.2/phalcon-dev-entrypoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/sh

set -e

isCommand() {
for cmd in \
"info" "i"\
"commands" "list" "enumerate"\
"controller" "create-controller" \
"module" "create-module" \
"model" "create-model" \
"all-models" "create-all-models" \
"project" "create-project" \
"scaffold" "create-scaffold" \
"migration" "create-migration" \
"webtools" "create-webtools" \
"serve" "server" \
"console" "shell" "psysh"
do
if [ -z "${cmd#"$1"}" ]; then
return 0
fi
done

return 1
}

# check if the first argument passed in matches a known command
if isCommand "$1"; then
exec phalcon "$@"
fi

exec "$@"
17 changes: 17 additions & 0 deletions 7.3/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM mileschou/phalcon:7.3

LABEL "repository"="https://github.com/MilesChou/phalcon-action"
LABEL "homepage"="https://github.com/MilesChou/phalcon-action"
LABEL "maintainer"="MilesChou <[email protected]>"

LABEL "com.github.actions.name"="Phalcon Action"
LABEL "com.github.actions.description"="An action for running project with Phalcon framework environment"
LABEL "com.github.actions.icon"="code"
LABEL "com.github.actions.color"="green"

# Install the devtools
RUN docker-phalcon-install-devtools

COPY phalcon-dev-entrypoint /usr/local/bin/phalcon-dev-entrypoint

ENTRYPOINT ["/usr/local/bin/phalcon-dev-entrypoint"]
33 changes: 33 additions & 0 deletions 7.3/phalcon-dev-entrypoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/sh

set -e

isCommand() {
for cmd in \
"info" "i"\
"commands" "list" "enumerate"\
"controller" "create-controller" \
"module" "create-module" \
"model" "create-model" \
"all-models" "create-all-models" \
"project" "create-project" \
"scaffold" "create-scaffold" \
"migration" "create-migration" \
"webtools" "create-webtools" \
"serve" "server" \
"console" "shell" "psysh"
do
if [ -z "${cmd#"$1"}" ]; then
return 0
fi
done

return 1
}

# check if the first argument passed in matches a known command
if isCommand "$1"; then
exec phalcon "$@"
fi

exec "$@"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LABEL "maintainer"="MilesChou <[email protected]>"
LABEL "com.github.actions.name"="Phalcon Action"
LABEL "com.github.actions.description"="An action for running project with Phalcon framework environment"
LABEL "com.github.actions.icon"="code"
LABEL "com.github.actions.color"="black"
LABEL "com.github.actions.color"="green"

# Install the devtools
RUN docker-phalcon-install-devtools
Expand Down

0 comments on commit 97ad329

Please sign in to comment.