From cd7a2b234506f5a9d20e1ae8ffa88fb236d0b50d Mon Sep 17 00:00:00 2001 From: antifallobst Date: Fri, 13 Oct 2023 00:37:39 +0200 Subject: [PATCH] ci: tried to fix the deploy workflow --- .gitea/workflows/deploy.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index bc87d07..53a2554 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -12,8 +12,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Cache Docker layers uses: https://github.com/actions/cache@v3 with: @@ -22,18 +24,30 @@ jobs: key: ${{ runner.os }}-buildx-${{ gitea.sha }} restore-keys: | ${{ runner.os }}-buildx- - - name: Build + + - name: Login to Container Registry + uses: docker/login-action@v3 + with: + registry: git.nerdcult.net/nerdcult + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and Push uses: docker/build-push-action@v5 + env: + ACTIONS_RUNTIME_TOKEN: '' with: context: . - load: true - tags: nerdcult_frontend:latest + push: true + tags: git.nerdcult.net/nerdcult/nerdcult_frontend:latest cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new + - name: Rotate the cache run: | rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache + - name: Deploy env: TOWER_TOKEN: ${{ secrets.WatchtowerToken}}