chetan/invalidate-cloudfront-action

Invalidation PATHS Environment Variable Stopped Working

Opened this issue · 4 comments

In my yaml I'm including PATHS: '/*' in the env:

      - name: invalidate
        uses: chetan/invalidate-cloudfront-action@master
        env:
          DISTRIBUTION: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION }}
          PATHS: '/*'
          AWS_REGION: 'us-east-1'
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

This worked on my invalidations up through Jan 11, 2020:

image

Now my invalidations look like the following, which seems to be ignoring the PATHS env:

image

I suspect somehow my /* is being expanded in a shell to a list of directories. Those directories don't exist in CloudFront for my S3 bucket.

Ah, you're right. Looks like the recent change to fix support for multiple paths broke that particular case. For the time being you can switch to using the tag for 1.0 before the change -

uses: chetan/invalidate-cloudfront-action@v1.0

This way you won't be affected by any later changes as well

Pushed a proper fix and tested with globs. Should be good again!

Thanks! I'll give it a try next time I have a change to deploy.