This commit is contained in:
vodyanoysh 2026-04-22 22:39:35 +07:00
parent 3e46d21b20
commit 13eadf717a

View file

@ -14,13 +14,13 @@ on:
required: false required: false
type: string type: string
default: "./Dockerfile" default: "./Dockerfile"
secrets:
REGISTRY_AUTH:
required: true
jobs: jobs:
build: build:
runs-on: docker runs-on: docker
permissions:
contents: read
packages: write
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -33,12 +33,10 @@ jobs:
- name: Configure registry auth - name: Configure registry auth
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
env: env:
TOKEN: ${{ secrets.GITEA_TOKEN }} REGISTRY_AUTH: ${{ secrets.REGISTRY_AUTH }}
ACTOR: ${{ github.actor }}
run: | run: |
mkdir -p ~/.docker mkdir -p ~/.docker
AUTH=$(printf '%s:%s' "$ACTOR" "$TOKEN" | base64 -w0) printf '{"auths":{"git.vodyanoysh.ru":{"auth":"%s"}}}' "$REGISTRY_AUTH" > ~/.docker/config.json
printf '{"auths":{"git.vodyanoysh.ru":{"auth":"%s"}}}' "$AUTH" > ~/.docker/config.json
- name: Extract metadata - name: Extract metadata
id: meta id: meta