Skip to content

Behavior tree diff comment #27

Behavior tree diff comment

Behavior tree diff comment #27

# Uploads the rendered images and posts the PR comment. Runs on workflow_run.
name: Behavior tree diff comment
on:
workflow_run:
workflows: ["Behavior tree diff"]
types: [completed]
permissions:
contents: read
pull-requests: write
actions: read
jobs:
comment:
name: Post behavior tree diff comment
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-24.04
steps:
- name: "Check for ARTIFACTS_FILE_HOUSE_KEY"
id: secrets_set
env:
ENABLER_SECRET: ${{ secrets.ARTIFACTS_FILE_HOUSE_KEY }}
run: |
unset SECRET_EXISTS
if [ -n "$ENABLER_SECRET" ]; then SECRET_EXISTS=true ; fi
echo "SECRETS_ENABLED=$SECRET_EXISTS" >> $GITHUB_OUTPUT
- name: Download rendered diffs
uses: actions/download-artifact@v8
with:
name: bt-diff
path: bt-diff-out
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload images and comment
if: steps.secrets_set.outputs.SECRETS_ENABLED
uses: tgstation/BehaviorTreeG@main
with:
mode: publish
token: ${{ secrets.GITHUB_TOKEN }}
file-house-key: ${{ secrets.ARTIFACTS_FILE_HOUSE_KEY }}