Closed paretje closed 1 year ago
This exposes the ssh option of docker build, allowing us to load an ssh key into the ssh-agent so it can be used while building the image, e.g. to pull from a private git repository.
docker build
An example:
steps: - uses: actions/checkout@v3 name: Check out code - uses: webfactory/ssh-agent@v0.7.0 with: ssh-private-key: ${{ secrets.SSH_KEY }} - uses: mr-smithers-excellent/docker-build-push@v6 name: Build & push Docker image with: image: repo/image tags: v1, latest registry: registry-url.io dockerfile: Dockerfile.ci username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} ssh: | default=${{ env.SSH_AUTH_SOCK }}
/ok-to-test
@paretje - thanks for the contribution. This will be released in v6.2
This exposes the ssh option of
docker build
, allowing us to load an ssh key into the ssh-agent so it can be used while building the image, e.g. to pull from a private git repository.An example: