2021-09-30 17:11:06 +00:00
|
|
|
name: Docker
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
2021-10-19 16:41:15 +00:00
|
|
|
- cron: '10 22 * * *'
|
|
|
|
|
2021-09-30 17:11:06 +00:00
|
|
|
push:
|
2021-10-03 18:47:00 +00:00
|
|
|
branches:
|
2021-10-19 16:41:15 +00:00
|
|
|
- main
|
|
|
|
|
2021-09-30 17:11:06 +00:00
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
2021-10-23 22:18:08 +00:00
|
|
|
archlinux:
|
2021-09-30 17:11:06 +00:00
|
|
|
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: Build and push Docker image
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
2021-10-23 22:18:08 +00:00
|
|
|
context: archlinux
|
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
|
|
tags: medzik/android-sdk:archlinux
|
2021-10-24 09:01:11 +00:00
|
|
|
|
2021-10-23 22:18:08 +00:00
|
|
|
ubuntu:
|
|
|
|
needs: archlinux
|
|
|
|
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: Build and push Docker image
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
context: ubuntu
|
2021-09-30 17:11:06 +00:00
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
2021-10-24 09:01:11 +00:00
|
|
|
tags: |
|
|
|
|
medzik/android-sdk:ubuntu
|
|
|
|
medzik/android-sdk:latest
|