website/.gitea/workflows/docker.yml

38 lines
914 B
YAML
Raw Normal View History

2024-04-21 18:28:19 +02:00
name: Build and publish Docker image
on: [push]
env:
REGISTRY: git.newpipe-ev.de
IMAGE_NAME: ${{ gitea.repository }}
2024-04-21 18:28:19 +02:00
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Log in to registry
uses: docker/login-action@v3
2024-04-21 18:28:19 +02:00
with:
registry: ${{ env.REGISTRY }}
2024-04-22 00:12:43 +02:00
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
2024-04-21 18:28:19 +02:00
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
2024-04-21 18:28:19 +02:00
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
2024-04-21 18:28:19 +02:00
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
2024-04-21 22:44:31 +02:00
platforms: |
linux/amd64