test: use kaniko to build image

This commit is contained in:
2023-09-01 09:22:40 +02:00
parent 2e9c7e3516
commit 12fe074643

View File

@ -8,20 +8,20 @@ jobs:
build:
name: Build image
runs-on: ubuntu-latest
steps:
- name: Install Docker
run: curl -fsSL https://get.docker.com | sh
- uses: actions/checkout@v3
# https://github.com/marketplace/actions/push-to-ghcr
- name: Build and publish a Docker image for ${{ gitea.repository }}
uses: macbre/push-to-ghcr@v13
- uses: docker/metadata-action@v3
id: metadata
with:
image_name: ${{ gitea.repository }} # it will be lowercased internally
github_token: ${{ secrets.GH_TOKEN }}
# optionally push to the Docker Hub (docker.io)
docker_io_token: ${{ secrets.DOCKER_IO_ACCESS_TOKEN }} # see https://hub.docker.com/settings/security
# customize the username to be used when pushing to the Docker Hub
docker_io_user: tandrade # see https://github.com/macbre/push-to-ghcr/issues/14
images: git.thebarrens.nu/${{ gitea.repository}}
- uses: docker/login-action@v2
with:
registry: git.thebarrens.nu
username: ${{ gitea.actor }}
password: ${{ secrets.GITEA_TOKEN }}
- uses: int1128/kaniko-action@v1
with:
push: true
tags: latest
labels: ${{ steps.metadata.outputs.labels }}
cache: false