2024-04-22 00:14:57 +02:00
|
|
|
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
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2024-05-19 02:54:39 +02:00
|
|
|
fetch-depth: 1
|
|
|
|
clean: true
|
2024-04-22 00:14:57 +02:00
|
|
|
|
|
|
|
- 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 }}
|
|
|
|
|
2024-05-19 02:54:39 +02:00
|
|
|
- name: Build image
|
2024-05-19 02:59:14 +02:00
|
|
|
uses: yinheli/act-kaniko@v1.0.0
|
2024-04-22 00:14:57 +02:00
|
|
|
with:
|
2024-05-19 02:54:39 +02:00
|
|
|
image: ${{ env.IMAGE_NNAME }}
|
|
|
|
|
|
|
|
# - 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
|