Skip to content

Commit

Permalink
Create docker-image.yml
Browse files Browse the repository at this point in the history
thanks #5735
  • Loading branch information
NikolajBjorner authored Dec 23, 2021
1 parent ecf4197 commit 6b0dc6d
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Publish Docker image

on:
schedule:
- cron: "0 1 * * 0" # every Sunday at 1 am
workflow_dispatch: # on button click

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

# -------
# BARE Z3
# -------
- name: Extract metadata (tags, labels) for Bare Z3 Docker Image
id: meta
uses: docker/metadata-action@v3
with:
images: deemetree/z3-fork
flavor: |
latest=auto
prefix=ubuntu-20.04-bare-z3-
tags: |
type=schedule,pattern={{date 'YYYYMMDD'}}
type=ref,event=tag
type=edge
type=sha,prefix=ubuntu-20.04-bare-z3-sha-
- name: Build and push Bare Z3 Docker Image
uses: docker/[email protected]
with:
context: .
push: true
target: bare-z3
file: ./docker/ubuntu-20-04.Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

# ------------------------------
# Repo description on Docker Hub
# ------------------------------
- name: Update repo description
uses: peter-evans/dockerhub-description@v2
with:
repository: deemetree/z3-fork
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
short-description: ${{ github.event.repository.description }}
readme-filepath: ./docker/README.md

0 comments on commit 6b0dc6d

Please sign in to comment.