Skip to content

Docker

Docker #444

Workflow file for this run

name: Docker
on:
pull_request:
branches-ignore: [ "dev*", "next", "nightly*" ]
push:
branches-ignore: [ "dev*", "next", "nightly*" ]
tags: [ "v*.*.*" ]
schedule:
- cron: "30 9 * * *" # 9:30 UTC
workflow_dispatch:
env:
REGISTRY: hub.docker.com
IMAGE_TAG: latest
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker buildx build --tag ${{ secrets.DOCKERHUB_USERNAME }}/contained:latest .
- name: cache
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-${{ github.sha }}
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get cache
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
dockerfile: Dockerfile
name: ${{ secrets.DOCKERHUB_USERNAME }}/contained
password: ${{ secrets.DOCKERHUB_TOKEN }}
snapshot: true
username: ${{ secrets.DOCKERHUB_USERNAME }}