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