From 61d699c2367e0525dbd68f3b40e32e251ffea84a Mon Sep 17 00:00:00 2001 From: Hamcha Date: Sat, 30 Mar 2024 19:24:18 +0100 Subject: [PATCH] ci: kaniko! --- .forgejo/workflows/build-container.yaml | 30 +++++++++---------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/.forgejo/workflows/build-container.yaml b/.forgejo/workflows/build-container.yaml index a50de3e..4d39889 100644 --- a/.forgejo/workflows/build-container.yaml +++ b/.forgejo/workflows/build-container.yaml @@ -7,24 +7,16 @@ on: jobs: build-and-publish: - runs-on: ubuntu-with-docker + runs-on: docker steps: - - uses: actions/checkout@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + - uses: actions/checkout@v4 + - name: Build + uses: https://codeberg.org/umglurf/kaniko-action@main with: - driver: docker - driver-opts: | - network=web - - name: Auth with uchu registry - uses: docker/login-action@v2 - with: - registry: ${{ secrets.DOCKER_REGISTRY }} - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - name: Build and push - uses: docker/build-push-action@v5 - with: - context: . - push: true - tags: ${{ secrets.DOCKER_REGISTRY }}/Hamcha/staxman:latest \ No newline at end of file + cache: true + cache_repo: ${{ secrets.DOCKER_REGISTRY }}/${{ github.repository }}/cache + credentials: | + ${{ secrets.DOCKER_REGISTRY }}=${{ secrets.DOCKER_USERNAME }}:${{ secrets.DOCKER_PASSWORD }} + destinations: | + ${{ secrets.DOCKER_REGISTRY }}/${{ github.repository }}:latest + push: 'true' \ No newline at end of file