Skip to content

Commit

Permalink
Merge pull request #6 from dustinbrownman/dustinbrownman/add-purge-url
Browse files Browse the repository at this point in the history
  • Loading branch information
yukukotani committed May 20, 2023
2 parents 4e5fd34 + a8bb4cb commit bea74ce
Show file tree
Hide file tree
Showing 8 changed files with 25,702 additions and 31,639 deletions.
28 changes: 23 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ A GitHub Actions to purge Fastly cache.

## Usage

### Puge by surrogate key

```yaml
- name: Purge Fastly cache
uses: yukukotani/fastly-purge-action@v1
Expand All @@ -15,6 +17,18 @@ A GitHub Actions to purge Fastly cache.
soft: true
```

### Purge by single url

```yaml
- name: Purge Fastly cache
uses: yukukotani/fastly-purge-action@v1
with:
api-token: YOUR_TOKEN_HERE
target: single-url
url: "https://example.com/some/page"
soft: true
```

## Options

### api-token
Expand All @@ -23,24 +37,28 @@ A GitHub Actions to purge Fastly cache.

Your API token of Fastly. See [here](https://developer.fastly.com/reference/api/#authentication) for details.

### service-id
### target

**Required**

Your service id to purge caches. **This is not service name. This will be a random alphanumeric string.**
The target to purge. Currently, only `surrogate-key` and `single-url` are supported. `all` will be supported if anyone requests.

### target
### service-id

**Required**
**Required when the target is `surrogate-key`**

The target to purge. Currently, only `surrogate-key` is supported. `all` and `url` will be supported if anyone requests.
Your service id to purge caches. **This is not service name. This will be a random alphanumeric string.**

### keys

**Required when the target is `surrogate-key`**

Surrogate Keys to purge.

### url

**Required when the target is `single-url`**

### soft

True by default. If false, the affected object will be inaccessible rather than marked as stale.
14 changes: 10 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,23 @@ inputs:
required: true
description: "API token of Fastly"
service-id:
required: true
description: "Service ID to purge"
required: false
description: "Service ID to purge. Required for `surrogate-key` target."
default: ""
soft:
description: "If false, the affected object will be inaccessible rather than marked as stale."
default: true
target:
required: true
description: "Target to purge. Currently only `surrogate-key` is supported."
description: "Target to purge. Currently only `surrogate-key` and `single-url` are supported."
keys:
required: true
required: false
description: "Surrogate keys to delete. Required if the target is `surrogate-key`."
default: []
url:
required: false
description: "Cached URL to purge. Required if the target is `single-url`."
default: ""
debug:
description: "debug key"
default: false
Expand Down
Loading

0 comments on commit bea74ce

Please sign in to comment.