Skip to content

Commit

Permalink
chore: add cache-control settings
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-ainsel committed Oct 10, 2024
1 parent c1d4240 commit 3eb4138
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions blocks/update-cdn-link/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ inputs:
Example:
'link/software/mixcr'
required: true

s3-bucket-key:
description: |
The name of a zero-byte object.
Expand All @@ -41,20 +41,34 @@ inputs:
Example:
'mixcr-develop.zip'
required: true

s3-region:
description: |
AWS region with target S3 bucket
required: false
default: 'eu-central-1'

s3-bucket:
description: |
AWS S3 bucket name
This bucket must be configurated as an s3 static website.
required: true

cache-settings:
description: |
This is where you specify the caching behavior.
For instance, `max-age=3600, must-revalidate`` tells the browser (or other caches)
that the object can be cached for 3600 seconds (1 hour), and must be revalidated with
the origin server after it has been in the cache for that duration.
`no-cache`: Forces caches to submit the request to the origin server for validation before releasing a cached copy.
`no-store`: The cache should not store anything about the client request or server response.
`public`: Marks authenticated responses as cacheable.
`private`: The response is intended for a single user and must not be stored by a shared cache.
required: false
default: 'no-cache'


runs:
using: "composite"
Expand All @@ -72,4 +86,5 @@ runs:
run: |
aws s3api put-object --bucket ${{ inputs.s3-bucket }} \
--key ${{ inputs.s3-bucket-path }}/${{ inputs.s3-bucket-key }} \
--website-redirect-location ${{ inputs.cdn-redirect-link }}
--website-redirect-location ${{ inputs.cdn-redirect-link }} \
--cache-control ${{ inputs.cache-settings }}

0 comments on commit 3eb4138

Please sign in to comment.