Skip to content

Advised usage for docker integration #11

Closed
@bendavies

Description

@bendavies

Hey there!

Thanks for the great action.
Do you have any opinion on the best way to use this action with docker volumes?

I'm doing this but would like to know if there is a better way?

on: push

name: "Test"

jobs:
  build:
    name: "Test"

    runs-on: ubuntu-latest

    steps:

      - name: "Install SSH Key"
        uses: webfactory/ssh-agent@v0.1.1
        with:
          ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

      - name: "Test"
        run: |
          docker run --rm \
            -v $SSH_AUTH_SOCK:/ssh-agent -v ~/.ssh/known_hosts:/root/.ssh/known_hosts -e SSH_AUTH_SOCK=/ssh-agent \
            image \
            bash -c "ssh-add -l && ssh -T git@github.com"

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions