[Magento-actions] | limit the number of kept releases on the server

Also one can limit release history by limiting or increasing the number of kept releases on the server with the keep_releases input arg :

    - name: 'launch magento2 zero downtime deploy'
      if: always()
      uses: MAD-I-T/magento-actions@master
      env:
        COMPOSER_AUTH: ${{secrets.COMPOSER_AUTH}}
        BUCKET_COMMIT: bucket-commit-${{github.sha}}.tar.gz
        MYSQL_ROOT_PASSWORD: magento
        MYSQL_DATABASE: magento
        HOST_DEPLOY_PATH: ${{secrets.STAGE_HOST_DEPLOY_PATH}}
        HOST_DEPLOY_PATH_BUCKET: ${{secrets.STAGE_HOST_DEPLOY_PATH}}/bucket
        SSH_PRIVATE_KEY: ${{secrets.STAGE_SSH_PRIVATE_KEY}}
        SSH_CONFIG: ${{secrets.STAGE_SSH_CONFIG}}
        WRITE_USE_SUDO: false
      with:
        deployer: 'no-permission-check'
        keep_releases: 2
        process: 'deploy-staging'

The above will limit the max number of tracked releases on the server to 2.