Skip to content

A GitHub action for publishing a message to a Google Cloud Pub/Sub topic

License

Notifications You must be signed in to change notification settings

miraliumre/actions-pubsub

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

actions-pubsub

A GitHub action for publishing a message to a Google Cloud Pub/Sub topic.

Usage

Authentication to the Google Cloud Platform must first be established with the google-github-actions/auth action.

The service account used for authentication must have sufficient permissions to publish messages on a Pub/Sub topic. You might wish to attribute the Pub/Sub Editor (pubsub.editor) role to it, preferably at the topic-level rather than at the project-level.

Example

name: Publish to Pub/Sub

...

jobs:
  publish-message:
    runs-on: ubuntu-latest

    steps:
      - id: auth
        name: Authenticate to Google Cloud Platform
        uses: google-github-actions/auth@v0
        with:
          ...

      - id: publish
        name: Publish a message to Google Cloud Pub/Sub
        uses: miraliumre/actions-pubsub@v1
        with:
          project_id: ${{ secrets.GCP_PROJECT_ID }}
          topic_name: 'github-actions'
          message: 'Hello world!'

Inputs

Name Required Description Default
project_id Yes The project ID registered with Google Cloud None
topic_name Yes The name of the topic the message will be published to None
message Yes The contents of the message to be published None
encoding No The message string encoding "utf8"

License

The actions-pubsub source code as provided on the src/main.js file is licensed under The Unlicense.

The files under the dist directory are automatically generated by @vercel/ncc from the source code of all dependencies of actions-pubsub, which are subject to different terms. Details of each dependency included and their respective licenses can be found on the dist/licenses.txt file.

About

A GitHub action for publishing a message to a Google Cloud Pub/Sub topic

Resources

License

Stars

Watchers

Forks

Packages