Skip to content

Docker

Docker #503

Workflow file for this run

# SPDX-FileCopyrightText: 2024 Emulsion contributors <https://github.com/codingteam/emulsion>
#
# SPDX-License-Identifier: MIT
name: Docker
on:
push:
branches:
- master
tags:
- 'v*'
pull_request:
branches:
- master
schedule:
- cron: '0 0 * * 6' # every Saturday
jobs:
publish:
runs-on: ubuntu-22.04
steps:
- name: Extract metadata for Docker
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
id: meta
uses: docker/metadata-action@v5
with:
images: |
codingteam/emulsion
tags: |
type=ref,event=branch
- name: Login to Docker Hub
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push Docker Images
uses: docker/build-push-action@v6
with:
tags: |
${{ steps.meta.outputs.tags }}
codingteam/emulsion:latest
push: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') && 'true' || 'false' }}