55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
name: Docker
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '10 22 * * *'
|
|
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Login to DockerHub
|
|
if: github.event_name != 'pull_request'
|
|
uses: docker/login-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Login to GitHub Container Registry
|
|
if: github.event_name != 'pull_request'
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build and push Docker image (archlinux)
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
context: archlinux
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
tags: |
|
|
medzik/android-sdk:archlinux
|
|
ghcr.io/m3dzik/android-sdk:archlinux
|
|
|
|
- name: Build and push Docker image (ubuntu)
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
context: ubuntu
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
tags: |
|
|
medzik/android-sdk:ubuntu
|
|
medzik/android-sdk:latest
|
|
ghcr.io/m3dzik/android-sdk:ubuntu
|
|
ghcr.io/m3dzik/android-sdk:latest
|