Skip to content

Commit bf62a51

Browse files
authored
Change MQTT workflow to publish to Redis stream
1 parent 2a1a042 commit bf62a51

1 file changed

Lines changed: 15 additions & 13 deletions

File tree

.github/workflows/mqtt.yml

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
1-
name: Send `ccdexplorer/services/projects/refresh` MQTT message
1+
name: Send Redis stream message
22

33
on:
44
push:
55
branches:
66
- main
7-
7+
88
jobs:
9-
build-container:
9+
publish-to-redis:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: Publish commit hash to mqtt broker
13-
uses: juhrlass/mqtt-action@master
14-
with:
15-
protocol: mqtt
16-
host: con24.sprocker.nl
17-
port: 1883
18-
topic: "ccdexplorer/services/projects/refresh"
19-
message: "{}"
20-
username: 'admin'
21-
password: ${{ secrets.MQTT_BROKER_PASSWORD }}
12+
- name: Install redis-tools
13+
run: sudo apt-get update && sudo apt-get install -y redis-tools
14+
15+
- name: Push empty data field to Redis stream
16+
env:
17+
REDIS_HOST: ${{ secrets.REDIS_HOST }}
18+
REDIS_PORT: 6379
19+
REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }}
20+
run: |
21+
redis-cli -h $REDIS_HOST -p $REDIS_PORT -a $REDIS_PASSWORD \
22+
XADD "blocks:projects:mainnet" '*' \
23+
data '{}'

0 commit comments

Comments
 (0)