appleboy / lambda-action

GitHub Action for Deploying Lambda code to an existing function

Home Page:https://github.com/marketplace/actions/aws-lambda-deploy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add `if: github.ref == 'refs/heads/master'` to example docu

nomeata opened this issue · comments

Maybe you assume that people will think about this, but I think it would be nice if the example from the documentation at https://github.com/marketplace/actions/aws-lambda-deploy would only deploy from the master branch (I think you usually only ever want to deploy from a specific branch, master or release)

      - name: default deploy
        if: github.ref == 'refs/heads/master'
        uses: appleboy/lambda-action@master
        with:
          aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
          aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          aws_region: ${{ secrets.AWS_REGION }}
          function_name: gorush
          zip_file: example/deployment.zip

Thanks! I’m surprised that it’s not just simply in the first example (why would anyboy deploy from just any branch?), but maybe there is a good reason.