Files
mqtt-explorer/.github/workflows/copilot-setup-steps.yml
Thomas Nordquist 00eb7d4aa5 Update secret persistence method in workflow
Persist OPENAI_API_KEY to .env.llm-tests instead of GITHUB_ENV.
2026-01-30 21:22:55 +01:00

58 lines
1.5 KiB
YAML

name: 'Copilot Setup Steps'
# Automatically run the setup steps when they are changed to allow for easy validation, and
# allow manual testing through the repository's "Actions" tab
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
env:
TESTS_MQTT_BROKER_HOST: localhost
TESTS_MQTT_BROKER_PORT: 1883
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
steps:
- name: Persist Secrets to Agent Environment
run: |
echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}" >> .env.llm-tests
- name: Checkout code
uses: actions/checkout@v6
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y xvfb mosquitto
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache yarn dependencies
uses: actions/cache@v4
id: yarn-cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
node_modules
app/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn