Giter Site home page Giter Site logo

ga2swarm's Introduction

Github Actions to Docker Swarm

Simple Docker Swarm service updater similar to Portainer webhooks.

Inputs

serviceId

Description: The ID of the service
Required: true

imageTag

Description: The Docker image tag
Required: false

dockerOptions

Description: JSON connection options (dockerode)
Required: true

privateKeyPath

Description: SSH Path to your private key for secure connections. Required: false

privateKey

Description: SSH private key for secure connections. Required: false

Usage

To use this action, include it in your GitHub Actions workflow YAML file. Below is an example demonstrating how to configure and use this action:

name: Update Docker Swarm Service
on:
  push:
    branches:
      - main

jobs:
  update-swarm-service:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Update Docker Swarm Service
        uses: theevolk/ga2swarm
        with:
          serviceId: 'your-service-id'
          imageTag: 'latest'
          dockerOptions: '{"host": "tcp://your-docker-host:2375", "protocol": "https"}'

Example Configuration Details

  • serviceId: Replace 'your-service-id' with the actual ID of your Docker Swarm service that you want to update.
  • imageTag: Replace 'latest' with the specific Docker image tag you wish to deploy. If not provided, the action will use the default tag.
  • dockerOptions: Provide the appropriate JSON connection options for connecting to your Docker Swarm manager node. Adjust the host and protocol as needed. Use dockerOptions.privateKeyPath to specify the path to your private key for secure connections.

This action simplifies the process of updating a Docker Swarm service directly from your GitHub repository using GitHub Actions.

ga2swarm's People

Contributors

theevolk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.