2021-09-28 21:26:18 +00:00
|
|
|
name: Docker
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
2021-10-03 11:58:44 +00:00
|
|
|
- cron: '0 0 * * *'
|
2021-10-19 16:35:05 +00:00
|
|
|
|
2021-09-28 21:26:18 +00:00
|
|
|
push:
|
2021-10-03 12:19:24 +00:00
|
|
|
branches:
|
2021-10-19 16:35:05 +00:00
|
|
|
- main
|
|
|
|
|
2021-09-28 21:26:18 +00:00
|
|
|
pull_request:
|
2021-10-19 16:35:05 +00:00
|
|
|
|
2021-10-03 12:18:40 +00:00
|
|
|
workflow_dispatch:
|
2021-09-28 21:26:18 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2022-03-13 21:19:33 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-09-28 21:26:18 +00:00
|
|
|
|
|
|
|
- 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: .
|
|
|
|
push: ${{ github.event_name != 'pull_request' }}
|
2021-10-19 16:35:05 +00:00
|
|
|
tags: medzik/fdroidserver:latest
|