Skip to content

Fix counter tray edits applying to the wrong tray #118

Fix counter tray edits applying to the wrong tray

Fix counter tray edits applying to the wrong tray #118

Workflow file for this run

name: CI
on:
workflow_dispatch:
pull_request:
branches: [main]
permissions:
contents: read
pull-requests: write
jobs:
lint-and-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Lint
run: pnpm lint
- name: Type check
run: pnpm check
fly_preview:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
needs: [lint-and-check]
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
concurrency:
group: pr-${{ github.event.pull_request.number }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Find existing comment
uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: '<!-- fly-preview-counterslayer -->'
- name: Create or update comment (deploying)
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
edit-mode: replace
body: |
<!-- fly-preview-counterslayer -->
### Fly Preview Deployment - In Progress :rocket:
Deploying preview to [Fly.io](https://fly.io/apps/pr-${{ github.event.pull_request.number }}-counterslayer/monitoring)...
- name: Deploy preview
uses: superfly/fly-pr-review-apps@1.3.0
with:
name: pr-${{ github.event.pull_request.number }}-counterslayer
config: fly.dev.toml
org: siege-perilous
- name: Find comment after deploy
uses: peter-evans/find-comment@v3
id: fc2
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: '<!-- fly-preview-counterslayer -->'
- name: Update comment (success)
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ steps.fc2.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
edit-mode: replace
body: |
<!-- fly-preview-counterslayer -->
### Fly Preview Deployment - Completed :white_check_mark:
- [Preview](https://pr-${{ github.event.pull_request.number }}-counterslayer.fly.dev) - [Fly Dashboard](https://fly.io/apps/pr-${{ github.event.pull_request.number }}-counterslayer/monitoring)
- name: Update comment (failure)
if: failure()
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ steps.fc2.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
edit-mode: replace
body: |
<!-- fly-preview-counterslayer -->
### Fly Preview Deployment - Failed :x:
Check the [workflow logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) for details.