Skip to content
play

GitHub Action

Stellate config preview

v1.0.0 Latest version

Stellate config preview

play

Stellate config preview

Preview the impact of new or updated caching rules on your existing operations

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Stellate config preview

uses: StellateHQ/[email protected]

Learn more about this action in StellateHQ/config-preview-action

Choose a version

Stellate Config Preview

Preview the impact of new or updated caching rules on your existing operations.

This GitHub Action runs the stellate cli config preview command and comments on your PRs with the detected changes and a link to your dashboard to view the impacted operations.

Screenshot 2023-09-11 at 13 49 21

Usage

The config preview action needs to be after the checkout action in order for the Stellate config file to be present.

Important

Write access needs to be granted for the pull-requests scope and also read access for contents scope.

Warning

This action only works for pull_request events.

on:
  pull_request:
    types: [opened, synchronize]

jobs:
  stellate-config-preview:
    runs-on: ubuntu-latest
    permissions:
      pull-requests: write
      contents: read
    steps:
      - uses: actions/checkout@v4
      - uses: StellateHQ/[email protected]
        with:
          stellate-token: ${{ secrets.STELLATE_TOKEN }}

Configuration

stellate-token

Required A Stellate token for access.

Head to your Access Tokens page, click the Create a token button, and name the new token. Make sure also to copy the token to a safe place; you won't be able to see it again.

Screenshot 2023-09-11 at 14 50 19

repo-token

Required A GitHub token for API access. Defaults to {{ github.token }}.