2025-02-06 16:56:56 +01:00

42 lines
1.3 KiB
YAML

name: 'Build docker container'
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: '${{ github.workspace }}'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
labels: |
org.opencontainers.image.title=epg-info
org.opencontainers.image.description=Docker image of https://github.com/iptv-org/epg
org.opencontainers.image.authors=Davidquinonescl
org.opencontainers.image.documentation=https://github.com/davidclaeysquinones/epg-info-docker/blob/main/README.md
images: ghcr.io/davidclaeysquinones/epg-info
tags: |
type=semver,pattern={{raw}}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}