From 12fe0746430574d92630393f7ed6cd5af411f971 Mon Sep 17 00:00:00 2001 From: Tom Andrade Date: Fri, 1 Sep 2023 09:22:40 +0200 Subject: [PATCH] test: use kaniko to build image --- .gitea/workflows/build-and-push.yaml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/build-and-push.yaml b/.gitea/workflows/build-and-push.yaml index b7d48f9..bf0d196 100644 --- a/.gitea/workflows/build-and-push.yaml +++ b/.gitea/workflows/build-and-push.yaml @@ -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