1
0
mirror of https://github.com/termux/termux-packages synced 2024-06-13 05:16:37 +00:00
termux-packages/.github/workflows/docker_image.yml
Henrik Grimler a5994b702c
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.
2022-02-08 10:23:05 +01:00

36 lines
990 B
YAML

name: Docker image
on:
push:
branches:
- master
paths:
- 'scripts/Dockerfile'
- 'scripts/properties.sh'
- 'scripts/setup-android-sdk.sh'
- 'scripts/setup-ubuntu.sh'
schedule:
- cron: '0 2 * * 0'
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Build
run: |
cd ./scripts
docker build --tag termux/package-builder:latest .
- 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 push termux/package-builder:latest