From 93eb243167398664b4dbfc86b05a3d90b6290721 Mon Sep 17 00:00:00 2001 From: Neur0toxine Date: Sun, 30 Mar 2025 17:23:05 +0300 Subject: [PATCH] another attempt at fixing pipeline --- .gitea/workflows/deploy.yml | 39 ++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index ab89e52..5dac93d 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -14,12 +14,37 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} - - name: Setup Docker + - name: Setup environment run: | - apt-get update && apt-get install -y docker.io curl - service docker start + echo "Running as user: $(whoami)" + echo "Current filesystem permissions:" + mount | grep -E 'overlay|tmpfs' + + if mount | grep -q "/ .*ro"; then + echo "Attempting to remount root filesystem as read-write" + if command -v sudo >/dev/null 2>&1; then + sudo mount -o remount,rw / + else + mount -o remount,rw / + fi + fi + + - name: Install and setup Docker + run: | + CMD_PREFIX="" + if command -v sudo >/dev/null 2>&1; then + CMD_PREFIX="sudo" + fi + + $CMD_PREFIX apt-get update + $CMD_PREFIX apt-get install -y docker.io curl + $CMD_PREFIX service docker start + timeout 15 sh -c "until docker info; do sleep 1; done" - + + echo "GITHUB_REPOSITORY_OWNER=${{ github.repository_owner }}" >> $GITHUB_ENV + echo "GITHUB_REPOSITORY_NAME=${{ github.repository_name }}" >> $GITHUB_ENV + - name: Set up Docker buildx uses: docker/setup-buildx-action@v3 with: @@ -42,5 +67,9 @@ jobs: - name: Deploy if: ${{ success() }} run: | - apk add --no-cache curl + if command -v apt-get >/dev/null 2>&1; then + apt-get install -y curl + elif command -v apk >/dev/null 2>&1; then + apk add --no-cache curl + fi curl -H "${{ secrets.DEPLOYER_AUTH }}" ${{ secrets.DEPLOYER_URL }} \ No newline at end of file