mirror of
https://github.com/hassio-addons/repository.git
synced 2025-05-03 18:51:29 +00:00
49 lines
2 KiB
YAML
49 lines
2 KiB
YAML
---
|
|
name: Repository Updater
|
|
|
|
# yamllint disable-line rule:truthy
|
|
on:
|
|
repository_dispatch:
|
|
types: ["update"]
|
|
|
|
jobs:
|
|
workflows:
|
|
uses: hassio-addons/workflows/.github/workflows/repository-updater.yaml@main
|
|
secrets:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
UPDATER_TOKEN: ${{ secrets.UPDATER_TOKEN }}
|
|
|
|
announce:
|
|
name: Announce add-on update
|
|
needs: workflows
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 📢 Announce on Discord server
|
|
uses: sarisia/actions-status-discord@v1.8.6
|
|
with:
|
|
webhook: ${{ secrets.DISCORD_WEBHOOK }}
|
|
nodetail: true
|
|
username: ${{ github.event.client_payload.name }}
|
|
avatar_url: |
|
|
https://raw.githubusercontent.com/${{ github.repository }}/master/${{ github.event.client_payload.addon }}/icon.png
|
|
title: ":arrow_up: ${{ github.event.client_payload.name }} ${{ github.event.client_payload.version }}"
|
|
image: |
|
|
https://raw.githubusercontent.com/${{ github.repository }}/master/${{ github.event.client_payload.addon }}/logo.png
|
|
description: |
|
|
A new version of the ${{ github.event.client_payload.name }} add-on has been published.
|
|
|
|
**Version**: `${{ github.event.client_payload.version }}`
|
|
**Release notes**:
|
|
<https://github.com/${{ github.event.client_payload.repository }}/releases/tag/${{ github.event.client_payload.version }}>
|
|
|
|
- name: 📢 Announce on Twitter
|
|
uses: devigned/go-twitter-action@v1.0.2
|
|
with:
|
|
apiKey: ${{ secrets.TWITTER_API_KEY }}
|
|
apiKeySecret: ${{ secrets.TWITTER_API_SECRET }}
|
|
accessToken: ${{ secrets.TWITTER_ACCESS_TOKEN }}
|
|
accessTokenSecret: ${{ secrets.TWITTER_ACCESS_SECRET }}
|
|
message: |
|
|
⬆️ ${{ github.event.client_payload.name }} ${{ github.event.client_payload.version }}
|
|
|
|
https://github.com/${{ github.event.client_payload.repository }}/releases/tag/${{ github.event.client_payload.version }}
|