-
Notifications
You must be signed in to change notification settings - Fork 36
48 lines (41 loc) · 1.37 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: "Build Docker Image on Base Image Update"
on:
push:
branches:
- master
schedule:
- cron: "0 9 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Check if Base Image Updated
id: image_update_check
uses: lucacome/docker-image-update-checker@v1
with:
base-image: "ubuntu:latest"
image: "realies/soulseek:latest"
- name: Set up Docker Buildx
if: steps.image_update_check.outputs.needs-updating == 'true'
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
if: steps.image_update_check.outputs.needs-updating == 'true'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push Docker Image
if: steps.image_update_check.outputs.needs-updating == 'true'
uses: docker/build-push-action@v2
with:
context: .
file: Dockerfile
push: true
tags: realies/soulseek:latest
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64
- name: Docker Image Digest
if: steps.image_update_check.outputs.needs-updating == 'true'
run: echo ${{ steps.docker_build.outputs.digest }}