From a499b8ef0a67226a80bcb7cf841c2e6dde24ba0f Mon Sep 17 00:00:00 2001 From: James Broad Date: Tue, 15 Jan 2019 21:20:20 +0000 Subject: [PATCH 1/3] Add Node.js to reduce friction deploying Node projects --- up/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/up/Dockerfile b/up/Dockerfile index 06763fe..7861f0b 100644 --- a/up/Dockerfile +++ b/up/Dockerfile @@ -9,6 +9,9 @@ LABEL "com.github.actions.description"="Perform Up application operations" LABEL "com.github.actions.icon"="chevron-up" LABEL "com.github.actions.color"="white" +RUN curl -sL https://deb.nodesource.com/setup_11.x | bash - +RUN apt-get install -y nodejs + ENV CI true RUN curl -sf https://up.apex.sh/install | sh RUN chmod +x /usr/local/bin/up From 22a9fe21511cff88fec7bfeed085da4c5be0c9d9 Mon Sep 17 00:00:00 2001 From: Hiya Date: Sun, 21 Nov 2021 16:42:08 +0000 Subject: [PATCH 2/3] Try build process as it used to be so commands can be given --- up/Dockerfile | 14 ++++++++++++-- up/action.yml | 14 -------------- up/cmd/up-wrapper/main.go | 24 ++++++------------------ 3 files changed, 18 insertions(+), 34 deletions(-) delete mode 100644 up/action.yml diff --git a/up/Dockerfile b/up/Dockerfile index 42ccad1..feba6b6 100644 --- a/up/Dockerfile +++ b/up/Dockerfile @@ -1,6 +1,15 @@ FROM golang:1.15 -RUN curl -sL https://deb.nodesource.com/setup_11.x | bash - +LABEL version="1.0.0" +LABEL maintainer="Apex" +LABEL repository="http://github.com/apex/actions" +LABEL homepage="http://github.com/apex/actions/up" +LABEL "com.github.actions.name"="Up" +LABEL "com.github.actions.description"="Perform Up application operations" +LABEL "com.github.actions.icon"="chevron-up" +LABEL "com.github.actions.color"="white" + +RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - RUN apt-get install -y nodejs ENV CI true @@ -9,4 +18,5 @@ RUN chmod +x /usr/local/bin/up RUN go get github.com/apex/actions/up/cmd/up-wrapper -ENTRYPOINT ["up-wrapper", "deploy", "--no-build"] \ No newline at end of file +ENTRYPOINT ["up-wrapper"] +CMD ["deploy", "--no-build"] \ No newline at end of file diff --git a/up/action.yml b/up/action.yml deleted file mode 100644 index 4b98871..0000000 --- a/up/action.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: 'Apex Up' -description: 'Deploy & manage Up applications' -inputs: - stage: - description: 'Up stage to deploy' - required: true -runs: - using: 'docker' - image: 'Dockerfile' - args: - - ${{ inputs.stage }} -branding: - icon: 'chevron-up' - color: 'white' \ No newline at end of file diff --git a/up/cmd/up-wrapper/main.go b/up/cmd/up-wrapper/main.go index c93d50d..f41ff36 100644 --- a/up/cmd/up-wrapper/main.go +++ b/up/cmd/up-wrapper/main.go @@ -45,15 +45,11 @@ func main() { // proxy to up(1) start := time.Now() - // run `up upgrade` if UP_CONFIG is present - if os.Getenv("UP_CONFIG") != "" { - if err := up("upgrade"); err != nil { - log.Fatalf("error upgrading: %s\n", err) - } - } - - // run the user-specified action command - if err := up(args...); err != nil { + cmd := exec.Command("up", args...) + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + err = cmd.Run() + if err != nil { log.Fatalf("error: %s", err) } @@ -74,12 +70,4 @@ func main() { log.Fatalf("error writing slack message: %s", err) } } -} - -// up executes with the given arguments. -func up(args ...string) error { - cmd := exec.Command("up", args...) - cmd.Stdout = os.Stdout - cmd.Stderr = os.Stderr - return cmd.Run() -} +} \ No newline at end of file From 6bbb94d8c431481b65bf6d2248cba69fe0ddff24 Mon Sep 17 00:00:00 2001 From: James Broad Date: Mon, 18 Dec 2023 22:14:25 +0000 Subject: [PATCH 3/3] Handle apex.sh being down --- up/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/up/Dockerfile b/up/Dockerfile index feba6b6..75f39f6 100644 --- a/up/Dockerfile +++ b/up/Dockerfile @@ -13,7 +13,7 @@ RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - RUN apt-get install -y nodejs ENV CI true -RUN curl -sf https://up.apex.sh/install | sh +RUN curl -sf https://raw.githubusercontent.com/apex/up/master/install.sh | sh RUN chmod +x /usr/local/bin/up RUN go get github.com/apex/actions/up/cmd/up-wrapper