This GitHub Action invalidates a CloudFront distribution by its origin and alias. It takes the DOMAIN_NAME environment variable as an input and uses the AWS CLI to invalidate the CloudFront distribution.
Usage To use this action, add the following step to your workflow:
steps:
- name: Invalidate CloudFront distribution
uses: er5bus/cloudfront-invalidator-action@v1.0.0
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
DOMAIN_NAME: mydomain.com
Make sure to replace mydomain.com with your own domain name.
Inputs
DOMAIN_NAME
(required)
The domain name of the CloudFront distribution to invalidate.
Output The action will output the ID of the Cloudfront distribution that was invalidated.
CloudFront distribution with Id: E1234567890ABC has been invalidated.
License This action is licensed under the MIT License.