workflows: docker: change auth user, and use docker/login-action

This should make automatic updates work again. docker/login-action
allows for authentication with a token instead of password.

Inspiration taken from workflow in github.com/termux/termux-docker.
This commit is contained in:
Henrik Grimler 2022-02-08 10:20:30 +01:00
parent ef60aa9fca
commit a5994b702c
No known key found for this signature in database
GPG Key ID: B0076E490B71616B
1 changed files with 8 additions and 5 deletions

View File

@ -23,10 +23,13 @@ jobs:
run: |
cd ./scripts
docker build --tag termux/package-builder:latest .
- name: Push to hub.docker.com
env:
DOCKER_LOGIN: xeffyr
DOCKER_PASS: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Login to Docker Hub
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'termux/termux-packages'
uses: docker/login-action@v1
with:
username: grimler
password: ${{ secrets.DOCKER_TOKEN }}
- name: Push to Docker Hub
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' && github.repository == 'termux/termux-packages'
run: |
docker login --username "${DOCKER_LOGIN}" --password "${DOCKER_PASS}"
docker push termux/package-builder:latest