Build Docker image with Gitea actions
Some checks failed
Build and publish Docker image / build (push) Failing after 11s
Some checks failed
Build and publish Docker image / build (push) Failing after 11s
This commit is contained in:
parent
084e8acc7e
commit
92eb022d2f
1 changed files with 40 additions and 0 deletions
40
.gitea/workflows/docker.yml
Normal file
40
.gitea/workflows/docker.yml
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
name: Build and publish Docker image
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
env:
|
||||||
|
REGISTRY: git.newpipe-ev.de
|
||||||
|
# make sure the name is lowercase, otherwise Docker won't accept it
|
||||||
|
IMAGE_NAME: newpipe-ev/website:latest
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Log in to registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ env.REGISTRY }}
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
platforms: |
|
||||||
|
linux/amd64
|
Loading…
Reference in a new issue