Skip to content

preview-publish

preview-publish #21

# SPDX-License-Identifier: AGPL-3.0-only
# Copyright (C) 2026 RS-Key contributors
name: preview-publish
on:
workflow_run:
workflows: [ci]
types: [completed]
permissions:
actions: read
contents: read
id-token: write
pull-requests: write
concurrency:
group: preview-${{ github.event.workflow_run.id }}-${{ github.event.workflow_run.run_attempt }}
cancel-in-progress: false
jobs:
publish:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
# workflow_run is privileged. Always use the publisher from main and only
# handle PR artifacts as data; no file downloaded from CI is executed.
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.repository.default_branch }}
persist-credentials: false
- name: publish preview firmware
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PREVIEW_API_URL: https://rskey.fob.wtf/api/previews
PREVIEW_PAGE_URL: https://rskey.fob.wtf/preview
run: node .github/scripts/publish-preview.mjs