Skip to content

Deploy images to Docker #45

Deploy images to Docker

Deploy images to Docker #45

Workflow file for this run

name: Deploy images to Docker
on:
workflow_dispatch:
release:
types: [published]
# push:
# branches: [main]
# paths:
# - 'Dockerfile'
# - '**.yml'
# - '.github/workflows/**'
jobs:
build:
runs-on: ubuntu-latest
env:
DOCKER_FILE: Dockerfile
VERSION: '0.22.21'
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Log into registry github
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push to registry
uses: docker/[email protected]
with:
context: .
file: ${{ env.DOCKER_FILE }}
platforms: linux/amd64,linux/arm/v7,linux/arm64
push: true
build-args: |
VERSION=${{ env.VERSION }}
tags: |
ghcr.io/${{ github.repository }}:${{ env.VERSION }}
ghcr.io/${{ github.repository }}:latest
${{ github.repository }}:${{ env.VERSION }}
${{ github.repository }}:latest
cache-from: type=registry,ref=${{ github.repository }}:latest
cache-to: type=inline