Docker action deprecated and archived

The Docker action was recently deprecated and archived in favor of using run. I want to make sure I do this in the most secure way possible, but the only options I see are:

- name: Docker login
  run: docker login --username ${{ secrets.DOCKER_USERNAME }} --password ${{ secrets.DOCKER_PASSWORD }}

or:

- name: Docker login
  run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login --username ${{ secrets.DOCKER_USERNAME }} --password-stdin

… neither of which feel safe.

References:

1 Like