Skip to content

Docker

Docker #77

Workflow file for this run

name: Docker
on:
push:
branches:
- master
tags:
- 'v*'
pull_request:
branches:
- master
schedule:
- cron: '0 0 * * 6' # every Saturday
workflow_dispatch:
jobs:
push:
runs-on: 'ubuntu-24.04'
steps:
- uses: actions/checkout@v4
- 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/codingteam.org.ru
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/codingteam.org.ru:latest
push: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') && 'true' || 'false' }}