2022-02-06 02:55:02 +00:00
|
|
|
name: Publish to Docker
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * 5' # Every Friday at midnight we publish an image from latest to Docker Hub.
|
2022-02-11 01:31:42 +00:00
|
|
|
workflow_dispatch:
|
2022-02-06 02:55:02 +00:00
|
|
|
|
|
|
|
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
|
2022-02-12 22:12:15 +00:00
|
|
|
- name: Login to Docker Hub
|
2022-02-11 01:28:15 +00:00
|
|
|
uses: docker/login-action@v1
|
2022-02-06 02:55:02 +00:00
|
|
|
with:
|
2022-02-11 01:35:18 +00:00
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
2022-02-11 01:36:38 +00:00
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
2022-02-12 22:14:52 +00:00
|
|
|
- name: Get current date/time in the usual format
|
|
|
|
id: date
|
2022-02-12 22:18:12 +00:00
|
|
|
run: echo "::set-output name=date::$(date +'%Y.%m.%d.%H%M%S')"
|
2022-02-06 02:55:02 +00:00
|
|
|
- name: Build and push Docker image
|
2022-02-11 23:28:32 +00:00
|
|
|
uses: docker/build-push-action@v2
|
2022-02-06 02:55:02 +00:00
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: true
|
2022-02-12 22:14:52 +00:00
|
|
|
tags: mikeah/prusaslicer-novnc:latest, mikeah/prusaslicer-novnc:${{ steps.date.outputs.date }}
|