Merge branch 'current' into next
66
.github/workflows/component-image.yml
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
name: Component Image Generator
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
name: Prepare
|
||||
if: github.event.issue.pull_request && startsWith(github.event.comment.body, '@esphomebot generate image')
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
name: ${{ steps.get_component.outputs.name }}
|
||||
comment_id: ${{ steps.create-comment.outputs.result }}
|
||||
steps:
|
||||
- name: Comment
|
||||
id: create-comment
|
||||
uses: actions/github-script@v7.0.1
|
||||
with:
|
||||
script: |
|
||||
const result = await github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: `@${context.actor} Generating image...`
|
||||
})
|
||||
return result.data.id
|
||||
|
||||
- name: Get Component name
|
||||
id: get_component
|
||||
run: |-
|
||||
comment="${{ github.event.comment.body }}"
|
||||
component=$(echo $comment | sed -n 's/^@esphomebot generate image //p')
|
||||
echo "name=$component" >> $GITHUB_OUTPUT
|
||||
|
||||
generate:
|
||||
name: Generate
|
||||
if: github.event.issue.pull_request && startsWith(github.event.comment.body, '@esphomebot generate image')
|
||||
runs-on: ubuntu-latest
|
||||
needs: prepare
|
||||
steps:
|
||||
- name: Generate
|
||||
uses: esphome/component-image-generator@v1.0.0
|
||||
with:
|
||||
component: ${{ needs.prepare.outputs.name }}
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4.3.3
|
||||
id: upload-artifact
|
||||
with:
|
||||
name: ${{ needs.prepare.outputs.name }}
|
||||
path: ${{ needs.prepare.outputs.name }}.svg
|
||||
|
||||
- name: Update Comment
|
||||
uses: actions/github-script@v7.0.1
|
||||
with:
|
||||
script: |
|
||||
await github.rest.issues.updateComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
comment_id: ${{ needs.prepare.outputs.comment_id }},
|
||||
body: `@${context.actor} Here is the image for the component ${{ steps.upload-artifact.outputs.artifact-url }}`
|
||||
})
|
3
.gitignore
vendored
@ -13,3 +13,6 @@ venv
|
||||
/.idea/
|
||||
|
||||
_pagefind/
|
||||
|
||||
# Vim
|
||||
*.swp
|
||||
|
BIN
svg2png/alarm-panel.png
Normal file
After Width: | Height: | Size: 8.4 KiB |
BIN
svg2png/analog_threshold.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
svg2png/content-copy.png
Normal file
After Width: | Height: | Size: 8.9 KiB |
BIN
svg2png/dac7678.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
svg2png/ektf2232.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
svg2png/feedback_cover.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
svg2png/format-font.png
Normal file
After Width: | Height: | Size: 7.8 KiB |
BIN
svg2png/garage-variant.png
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
svg2png/gcja5.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
svg2png/gp8403.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
svg2png/haier.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
svg2png/head-lightbulb-outline.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
svg2png/high-voltage-warning.png
Normal file
After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 21 KiB |
BIN
svg2png/host.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
svg2png/i2s_audio.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
svg2png/ili9341.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
svg2png/ili9342.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
svg2png/ili9481.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
svg2png/ili9488.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
svg2png/kamstrup_kmp_holder.png
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
svg2png/kamstrup_kmp_sch.png
Normal file
After Width: | Height: | Size: 53 KiB |
BIN
svg2png/lcd_gpio.png
Normal file
After Width: | Height: | Size: 158 KiB |
BIN
svg2png/libretiny.png
Normal file
After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 15 KiB |
BIN
svg2png/logo.png
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 422 B After Width: | Height: | Size: 15 KiB |
BIN
svg2png/max44009.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
svg2png/mcp47a1.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
svg2png/microphone.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
svg2png/pca6416a.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
svg2png/pellet.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
svg2png/psram.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
svg2png/qr-code.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
svg2png/radio-tower.png
Normal file
After Width: | Height: | Size: 47 KiB |
BIN
svg2png/rp2040.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
svg2png/rtl87xx.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
svg2png/sigma-delta.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
svg2png/sm2235.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
svg2png/sm2335.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
svg2png/sml.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
svg2png/speaker.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
svg2png/sprinkler-variant.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
svg2png/st7796.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
svg2png/thermometer.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
svg2png/timer-play-outline.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
svg2png/uponor.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
svg2png/voice-assistant.png
Normal file
After Width: | Height: | Size: 10 KiB |
BIN
svg2png/water-drop.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
svg2png/wireguard_custom_logo.png
Normal file
After Width: | Height: | Size: 38 KiB |
BIN
svg2png/xl9535.png
Normal file
After Width: | Height: | Size: 20 KiB |