Skip to content

thematchless/bump-image-version-action

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

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build and publish Docker image

Bump docker image version on a remote host

This repository contains an GitHub action to bump up a docker image version specified in your docker-compose stack.

Requirements for this GitHub Action to work

  • your remote server must be accessible via ssh and is reachable
  • you have a ssh private and public key to authenticate via ssh
  • you have saved your private and public key to the GitHub project secrets

Configuration options for the action

required key example default description
remote_docker_host thematchless@fancyServer.de username@host
ssh_private_key -----BEGIN OPENSSH PRIVATE KEY----
UgAAAAtzc2gtZWQyNTUxOQAAACALBUg
UgAAAAtzc2gtZWQyNTUxOQAAACALBUg
UgAAAAtzc2gtZWQyNTUxOQAAACALBUg
-----END OPENSSH PRIVATE KEY-----
private key in PEM format
ssh_public_key ssh-ed25519 ABCDABCDu027374972309 public key of the PEM
service_name super-fancy-react-app name of the service inside of the compose file
deploy_path /home/thematchless/stack-1 path which contains your compose file on the remote host
args up -d arguments how to start your service
stack_file_name docker-compose.yaml docker-compose.yml name of the compose file
remote_docker_port 1337 22 ssh port on the host
pull_images_first true false flag to force the image pull before starting

Example GitHub action task

- name: Deploy on Remote Server
  uses: thematchless/bump-image-version-action@v2
  with:
    remote_docker_host: thematchless@fancyServer.de
    ssh_private_key: ${{ secrets.REMOTE_SSH_PRIVATE_KEY }}
    ssh_public_key: ${{ secrets.REMOTE_SSH_PUBLIC_KEY }}
    service_name: super-fancy-react-app
    deploy_path: /home/thematchless/stack-1
    args: up -d
    pull_images_first: true

License

This project is licensed under the MIT license. See the LICENSE file for details.

About

GitHub action to bump up a docker image version deployed in a docker-compose file on a remote server via ssh

Topics

Resources

License

Stars

Watchers

Forks