Skip to content

amirmarmul/docker-context-ssh-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

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GitHub release GitHub marketplace

About

Github Action for creating docker context over SSH authentication.

Input variables

See action.yml for more detailed information.

  • ssh-host - ssh host
  • ssh-port - ssh port, default 22
  • ssh-username - ssh username
  • ssh-private-key - content of ssh private key. ex raw content of ~/.ssh/id_rsa
  • ssh-passphrase - passphrase for ssh private key. no default.
  • ssh-socket - ssh socket, default /tmp/ssh-auth.sock
  • context-name - name of docker context. default: remote
  • context-use - indicate which this context is set as docker current context. default: false

Usage

on: [push]

jobs:
  docker_context_over_ssh_job: 
    runs-on: ubuntu-latest
    steps:
      - name: Set up docker context over SSH authentication
        uses: amirmarmul/docker-context-ssh-action@v1
        with:
          ssh-host: ${{ secrets.SSH_HOST }}
          ssh-username: ${{ secrets.SSH_USERNAME }}
          ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
          ssh-passphrase: ${{ secrets.SSH_PASSPHRASE }}
      
      - name: Inspect docker context  
        run: docker context ls -q