Skip to content

Tugboat Get Pull Request Preview ID

Actions
This action queries the Tugboat API and get the ID of a preview associated with a given PR
v1.0.0.beta.4
LatestPre-release
Star (2)

Tags

 (1)

Tugboat Get Pull Request Preview ID

This action queries the Tugboat API and get the ID of a preview associated with a given PR.

Note: This action may behave unexpectedly if there are more than one previews associated with a single pull request.

Inputs

tugboat-api-token

Required The Tugboat API token.

tugboat-repo-id

Required The Tugboat repository ID.

pull-request-number

Required The GitHub pull request number.

Outputs

tugboat-preview-id

The Tugboat preview ID.

Example usage

jobs:
  rebuild-tugboat-preview:
    runs-on: ubuntu-latest
    container:
      image: tugboatqa/cli
    steps:
      - name: Get the ID of the Tugboat preview associated with this pull request
        id: get-tugboat-preview-id
        uses: chromatichq/tugboat-pull-request-preview-id@v1
        with:
          tugboat-api-token: ${{ secrets.TUGBOAT_API_TOKEN }}
          tugboat-repo-id: ${{ secrets.TUGBOAT_REPO }}
          pull-request-number: ${{ github.event.issue.number }}
      # Use the output from the `get-tugboat-preview-id` step
      - name: Rebuild Tugboat preview
        run: tugboat rebuild ${{ steps.get-tugboat-preview-id.outputs.tugboat-preview-id }}"

Contributing

Building the Image Locally

To build this image locally on Apple Silicon, use the following command.

docker buildx build --platform linux/amd64 -t "tugboat_pr_action:Dockerfile" .

Running the Image Locally

docker run -it tugboat_pr_action:Dockerfile <REPLACE_WITH_TUGBOAT_TOKEN> <REPLACE_WITH_TUGBOAT_REPO_ID> <REPLACE WITH PR ID>

Tugboat Get Pull Request Preview ID is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

This action queries the Tugboat API and get the ID of a preview associated with a given PR
v1.0.0.beta.4
LatestPre-release

Tags

 (1)

Tugboat Get Pull Request Preview ID is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.