This action removes versions of your deployed app to App Engine that go beyond the set limit and makes the number of versions and version numbers available to later build steps via outputs. This allows you to parameterize your App Engine removals.
Note: The oldest versions that goes beyond your set limit will be deleted.
steps:
- id: remove
uses: Reviewable/appengine-remove-action@v2.1.2
with:
limit: 5
project_id: ${{ secrets.GCP_PROJECT_ID }}
credentials: ${{ secrets.GCP_CREDENTIALS }}
# Example of using the output
- id: test
run: |
echo "${{ steps.remove.outputs.versions_deleted }}"
echo "${{ steps.remove.total_deleted }}"
This action requires Google Cloud credentials that are authorized to delete an App Engine Application version. See the Authorization section below for more information.
project_id
: (Optional) ID of the Google Cloud project. If provided, this
will override the project configured by gcloud.
limit
: (required) The total number of the latest deployed versions to keep.
apply_limit_after_days
: (optional) Versions newer than this number of days before today will not be deleted.
Older versions will be subject to the limit value.
credentials
: (optional) The credentials to authorize connection to your
project deployed to App Engine. If included the google-github-actions/setup-gcloud@master
step prior to appengine-remove-action
, those credentials will be accessed
by default.
service_name:
(optional) The name of the service that you want to target. If provided,
this will only remove the versions related to the service.
versions_deleted
: An array of versions that were deleted.total_deleted
: The total number of versions deleted.There are a few ways to authenticate this action. The caller must have permissions to access the secrets being requested.
Roles needed:
roles/appengine.appAdmin
): Can manage all App Engine resources (not recommended)roles/appengine.deployer
): Can delete App Engine versions if it's not receiving any traffic (recommended)