1
0
Fork 0
mirror of https://github.com/docker/login-action.git synced 2025-03-29 02:00:05 +01:00

README: Note about docker login and custom actions

Fixes #32
This commit is contained in:
Mitchel Humpherys 2020-11-18 17:29:46 -08:00
parent 12fd63324c
commit 6dce0ba5ef

View file

@ -339,3 +339,23 @@ updates:
## Limitation
This action is only available for Linux [virtual environments](https://help.github.com/en/articles/virtual-environments-for-github-actions#supported-virtual-environments-and-hardware-resources).
Note that if you plan on interacting with a private registry from _within_
a custom Docker-based action (Docker in Docker) you'll want to set the
`DOCKER_CONFIG` environment variable accordingly:
```yaml
jobs:
build:
runs-on: ...
env:
DOCKER_CONFIG: $HOME/.docker
steps:
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: My cool action with some authenticated DinD commands
uses: ./actions/my_cool_action/
```