From 1ab09d4344fe750f265a20bc30b715c66cfbba1f Mon Sep 17 00:00:00 2001 From: Duy Dao Date: Mon, 28 Jul 2025 23:08:39 +0700 Subject: [PATCH] chore: implement retry mechanism for container publishing in CI workflow --- .gitea/workflows/ci.yaml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 090e060..80a61df 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -41,13 +41,18 @@ jobs: run: | sed -i "s/public static readonly string CommitHash = \"\[DEVELOPMENT\]\";/public static readonly string CommitHash = \"${{ steps.metadata.outputs.COMMIT_HASH }}\";/" CaddyManager/Configurations/Application/ApplicationInfo.cs - name: Publish container - run: | - dotnet publish \ - --configuration Release --os linux --arch x64 \ - /t:PublishContainer -p ContainerRegistry=${{ vars.DOCKER_GITEA_DOMAIN }} \ - -p ContainerRepository=ebolo/caddy-manager -p:ContainerImageTags='"${{ steps.metadata.outputs.APP_VERSION }};latest"' + uses: nick-fields/retry@v3 + with: + timeout_minutes: 10 + max_attempts: 3 + command: | + dotnet publish \ + --configuration Release --os linux --arch x64 \ + /t:PublishContainer -p ContainerRegistry=${{ vars.DOCKER_GITEA_DOMAIN }} \ + -p ContainerRepository=ebolo/caddy-manager -p:ContainerImageTags='"${{ steps.metadata.outputs.APP_VERSION }};latest"' - name: Deploy to Komodo uses: fjogeleit/http-request-action@v1 + if: success() with: url: '${{ vars.WINDMILL_DOMAIN }}/komodo/pull-stack/${{ secrets.KOMODO_STACK_ID }}' method: 'PUT'