From 4fb691135d5b634d18c69d353f7d7b19a8217b59 Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Fri, 8 May 2026 13:57:54 +0700 Subject: [PATCH] Configure registry auth for Gitea builds --- .gitea/workflows/build-and-deploy.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/build-and-deploy.yml b/.gitea/workflows/build-and-deploy.yml index 89f158e..17ffa81 100644 --- a/.gitea/workflows/build-and-deploy.yml +++ b/.gitea/workflows/build-and-deploy.yml @@ -5,10 +5,6 @@ on: branches: - main -permissions: - contents: read - packages: write - jobs: build: runs-on: build-host @@ -19,11 +15,12 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Log in to Gitea registry + - name: Configure Gitea registry auth run: | - echo "${{ secrets.GITEA_TOKEN }}" | docker login gitea.dsrptlab.com \ - -u "${{ github.actor }}" \ - --password-stdin + set -euo pipefail + mkdir -p ~/.docker + auth="$(printf '%s:%s' "${{ secrets.REGISTRY_USERNAME }}" "${{ secrets.REGISTRY_TOKEN }}" | base64 | tr -d '\n')" + printf '{"auths":{"gitea.dsrptlab.com":{"auth":"%s"}}}\n' "$auth" > ~/.docker/config.json - name: Build and push image run: | @@ -51,7 +48,7 @@ jobs: set -euo pipefail [ -f .deploy-current ] || exit 0 payload=$(cat <