Skip to content

Update GitHub WorkFlows #69

Update GitHub WorkFlows

Update GitHub WorkFlows #69

---
name: Docker Container Builds
on:
push:
branches:
- master
- dev
- dev-tbyte
tags:
- "release"
- "v*.*.*"
workflow_dispatch:
inputs:
dockerPush:
description: 'Push image to docker hub?'
required: true
type: boolean
default: false
#schedule:
# * is a special character in YAML so you have to quote this string
# Run every day at 5:24 UTC - build 'latest' docker containers
# - cron: '24 17 * * *'
env:
DOCKER_PUSH: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- dbType: mysql
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Populate Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: tetrabyteit/securesend
flavor: |
latest=false
tags: |
type=match,pattern=release
type=schedule,pattern=latest
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=semver,pattern=latest
type=ref,event=branch
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push pwpush-${{ matrix.dbType }} Docker images
uses: docker/build-push-action@v4
with:
file: ./containers/docker/pwpush-${{ matrix.dbType }}/Dockerfile
platforms: linux/amd64
provenance: false
push: true
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=registry,ref=tetrabyteit/securesend:buildcache
cache-to: type=registry,ref=tetrabyteit/securesend:buildcache,mode=max