73 lines
2.7 KiB
YAML
73 lines
2.7 KiB
YAML
name: 'Build docker container'
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
workflow_dispatch:
|
|
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: Login to Github container registry
|
|
uses: https://github.com/docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ secrets.GHCR_USERNAME }}
|
|
password: ${{ secrets.GHCR_PASSWORD }}
|
|
- name: Login to Lavaforge container registry
|
|
uses: https://github.com/docker/login-action@v3
|
|
with:
|
|
registry: lavaforge.org
|
|
username: ${{ secrets.LAVAFORGE_USERNAME }}
|
|
password: ${{ secrets.LAVAFORGE_PASSWORD }}
|
|
- name: Extract metadata (tags, labels) for Docker
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
labels: |
|
|
org.opencontainers.image.title=hyperion-docker
|
|
org.opencontainers.image.description=Docker image of Hyperion
|
|
org.opencontainers.image.authors=Davidquinonescl
|
|
org.opencontainers.image.documentation=https://git.claeyscloud.com/david/hyperion-docker
|
|
images: |
|
|
davidquinonescl/hyperion-docker
|
|
git.claeyscloud.com/david/hyperion-docker
|
|
ghcr.io/davidclaeysquinones/hyperion-docker
|
|
lavaforge.org/davidquinonescl/hyperion-docker
|
|
flavor: |
|
|
latest=true
|
|
tags: |
|
|
type=semver,pattern={{raw}}
|
|
type=sha
|
|
- name: 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/hyperion-docker
|
|
- 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 }}
|