See individual action directory for detailed usage instructions.
JetStream Service In Workflow
JetStream can be run within the workflow job as a local service, here’s an example starting the Service and creating a Stream in it.
on: push
name: orders
jobs:
orders:
runs-on: ubuntu-latest
services:
# starts a JetStream service locally known as "jetstream" on the network
jetstream:
image: nats:latest
# creates a stream on the "jetstream:4222" server started above
- name: orders_stream
uses: nats-io/jetstream-gh-action/create/stream@main
with:
config: ORDERS.json
server: jetstream:4222
This server is available to all steps in the job that hosts it.
Publishing Messages
Messages can be published to a Stream, or any NATS subject, using the base action.
Usage
on: push
name: consumer
jobs:
consumer_validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: hello
uses: nats-io/jetstream-gh-action@main
with:
subject: ORDERS.deploy
message: Published new deployment via "${{ github.event_name }}" in "${{ github.repository }}"
should_ack: 1
server: nats.example.net:4222
Inputs
Input
Description
subject
The subject to publish to (required)
message
The message payload (required)
should_ack
If a positive response from JetStream is required for success
server
Comma separated list of NATS Server URLs (required)
NATS JetStream GitHub Action Pack
This is a collection of GitHub Actions to interact with NATS JetStream.
See individual action directory for detailed usage instructions.
JetStream Service In Workflow
JetStream can be run within the workflow job as a local service, here’s an example starting the Service and creating a Stream in it.
This server is available to all steps in the job that hosts it.
Publishing Messages
Messages can be published to a Stream, or any NATS subject, using the base action.
Usage
Inputs
subjectmessageshould_ackserverusernamepasswordcredentialsOutputs
response