serverless / github-action

:zap::octocat: A Github Action for deploying with the Serverless Framework
Apache License 2.0
662 stars 174 forks source link

v1.82.0 Dockerfile installs the latest serverless from npm (which is now v2.0.0 as of a few hours ago) #39

Closed epsilonlambda closed 4 years ago

epsilonlambda commented 4 years ago

Ever since the new serverless release v2 is out (https://github.com/serverless/serverless/releases/tag/v2.0.0), I've been unable to deploy my v1 project with github-action v1.82.0.

Failing step from my GitHub Actions pipeline:

     - name: serverless deploy
        uses: serverless/github-action@v1.82.0
        with:
          args: deploy

Output from the serverless deploy step:

  Serverless Error ---------------------------------------

  The Serverless version (2.0.0) does not satisfy the "frameworkVersion" (1) in serverless.yml

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information ---------------------------
     Operating System:          linux
     Node Version:              12.18.3
     Framework Version:         2.0.0
     Plugin Version:            4.0.2
     SDK Version:               2.3.1
     Components Version:        3.1.2

Framework version from my serverless.yml:

frameworkVersion: '1'

I am suspecting that the following line in v1.82.0 (https://github.com/serverless/github-action/blob/v1.82.0/Dockerfile#L14):

RUN npm i -g serverless

should have been

RUN npm i -g serverless@1.82.0

Is this a bug, or is the latest tag for serverless/github-action actually designed to pull the latest version for some reason?

EDIT: Added output from the failing pipeline step.

DavideViolante commented 4 years ago

Thanks, https://github.com/serverless/github-action/commit/c94a5fdf2236df60af9f01404deca85121eabcf0 Let me know if it works now.

RaevLogic commented 4 years ago

I'm just going to point out that while you did fix his issue, now the action is only downloading version 1.82, so all of us with "frameworkVersion" (2) are now getting the same error he was lol.

epsilonlambda commented 4 years ago

I think that the master branch (as opposed to commits tagged with version tags) should not have a version on that line (RUN npm i -g serverless) EDIT: Actually, I've realized this makes little sense. I'd just advise to merge #41, to master and tag it with v2.1.0.

RaevLogic commented 4 years ago

We were running into the problem last night and eventually just had to stop using this action and have our ci/cd install serverless manually. I'm not super familiar with how to set up these actions, but I see someone has a PR ready to merge that bumps this action's serverless version up to 2.1.0, which will just give @epsilonlambda problems again if he stays with "frameworkVersion" (1)

epsilonlambda commented 4 years ago

The PR wouldn't break my build, because I'm using a tag, not the master branch version of the action.

RaevLogic commented 4 years ago

My mistake then, apologies. Must be something else on our end.

epsilonlambda commented 4 years ago

@RaevLogic, my point is that if the PR is merged, it should fix your build, and it wouldn't break mine