From ee99df529ab367fc66b01e0b3213e77b1f5ee32a Mon Sep 17 00:00:00 2001 From: Ivan Carlos Date: Tue, 9 Dec 2025 05:00:40 +0000 Subject: [PATCH] Update .gitea/workflows/simplesbentocreation.yml --- .gitea/workflows/simplesbentocreation.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/simplesbentocreation.yml b/.gitea/workflows/simplesbentocreation.yml index 57b0cfb..1de6e2f 100644 --- a/.gitea/workflows/simplesbentocreation.yml +++ b/.gitea/workflows/simplesbentocreation.yml @@ -3,14 +3,18 @@ run-name: Build BentoPDF (Simple Mode) based on Upstream on: schedule: - # Roda diariamente às 04:00 AM - cron: '0 4 * * *' - # Permite rodar manualmente pela interface do Gitea workflow_dispatch: jobs: check-and-build: runs-on: ubuntu-latest + # --- CORREÇÃO AQUI --- + # Forçamos o uso de uma imagem que contém as ferramentas necessárias (como o node para rodar as actions) + container: + image: catthehacker/ubuntu:act-latest + # --------------------- + permissions: contents: read packages: write @@ -23,7 +27,6 @@ jobs: - name: Check Upstream Latest Commit id: check run: | - # Pega o SHA curto do último commit na branch MAIN do repositório original UPSTREAM_SHA=$(curl -s https://api.github.com/repos/alam00000/bentopdf/commits/main | jq -r .sha | head -c 7) echo "Latest upstream SHA: $UPSTREAM_SHA" echo "sha=$UPSTREAM_SHA" >> $GITHUB_OUTPUT @@ -38,7 +41,8 @@ jobs: - name: Check if Image Already Exists id: exists run: | - # Verifica se já temos uma imagem com essa tag no registro local + # Nota: O 'docker manifest' pode falhar se o daemon docker não estiver exposto. + # Se der erro aqui, o runner precisa ter o socket do docker montado (/var/run/docker.sock) if docker manifest inspect git.icc.gg/${{ gitea.repository }}:${{ steps.check.outputs.sha }} > /dev/null 2>&1; then echo "Image for commit ${{ steps.check.outputs.sha }} already exists." echo "skip=true" >> $GITHUB_OUTPUT @@ -52,16 +56,14 @@ jobs: uses: actions/checkout@v4 with: repository: alam00000/bentopdf - ref: main # Usando main conforme solicitado + ref: main - name: Inject SIMPLE_MODE into Dockerfile if: steps.exists.outputs.skip == 'false' run: | - # Insere a variável de ambiente no final do Dockerfile echo "" >> Dockerfile echo "ENV SIMPLE_MODE=true" >> Dockerfile echo "Custom ENV injected successfully." - # Mostra as últimas linhas para confirmar tail -n 5 Dockerfile - name: Set up Docker Buildx