56 lines
2.1 KiB
YAML
56 lines
2.1 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: Setup docker
|
|
uses: https://git.claeyscloud.com/david/gitea-actions/setup-docker@main
|
|
- name: Login to Gitea container registry
|
|
uses: https://github.com/docker/login-action@v3
|
|
with:
|
|
registry: git.claeyscloud.com
|
|
username: nologin
|
|
password: ${{ secrets.PACKAGE_TOKEN }}
|
|
- name: Login to DockerHub container registry
|
|
uses: https://github.com/docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
|
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
|
- 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://git.claeyscloud.com/david/epg-info-docker/src/branch/main/README.md
|
|
images: |
|
|
davidquinonescl/epg-info
|
|
git.claeyscloud.com/david/epg-info
|
|
tags: |
|
|
type=semver,pattern={{raw}}
|
|
type=sha
|
|
- name: Update docker Hub Description
|
|
uses: https://git.claeyscloud.com/david/gitea-actions/dockerhub-description@main
|
|
with:
|
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
|
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
|
repository: davidquinonescl/epg-info
|
|
- name: Build and push
|
|
uses: https://github.com/docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|