-
Notifications
You must be signed in to change notification settings - Fork 1
62 lines (53 loc) · 2.15 KB
/
dispatch.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: "Dispatch"
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
build:
name: "Check Versions"
runs-on: ubuntu-latest
steps:
- name: ⬇ Checkout
uses: actions/checkout@v4
- id: my_latestrelease
name: 🔎 Get My Version
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: ${{ github.repository }}
token: ${{ secrets.REPODISPATCH_TOKEN }}
- id: octoprint_latestrelease
name: 🔎 Get OctoPrint Version
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: OctoPrint/OctoPrint
excludes: prerelease,draft
token: ${{ secrets.REPODISPATCH_TOKEN }}
- id: octopi_latestrelease
name: 🔎 Get OctoPi Version
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: guysoft/OctoPi
excludes: prerelease,draft
token: ${{ secrets.REPODISPATCH_TOKEN }}
- id: simplyprint_latestrelease
name: 🔎 Get SimplyPrint Version
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: SimplyPrint/OctoPrint-SimplyPrint
excludes: prerelease,draft
token: ${{ secrets.REPODISPATCH_TOKEN }}
- name: 💁 Print Versions
run: |
echo "my version: ${{ steps.my_latestrelease.outputs.release }}"
echo "octoprint version: ${{ steps.octoprint_latestrelease.outputs.release }}"
echo "octopi version: ${{ steps.octopi_latestrelease.outputs.release }}"
echo "SimplyPrint version: ${{ steps.simplyprint_latestrelease.outputs.release }}"
- name: 🚀 Repository Dispatch
if: ${{ format('{0}.op{1}.sp{2}', steps.octopi_latestrelease.outputs.release, steps.octoprint_latestrelease.outputs.release, steps.simplyprint_latestrelease.outputs.release) != steps.my_latestrelease.outputs.release }}
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.REPODISPATCH_TOKEN }}
repository: SimplyPrint/SimplyPi
event-type: octoprint_release
client-payload: '{"version": "${{ steps.octoprint_latestrelease.outputs.release }}"}'