61755f4922
Build & Push Image / Build and push to GHCR (push) Failing after 1m26s
Копии .github/workflows/{build,deploy}.yml. Логин на ghcr.io — через
secrets.GHCR_TOKEN (настоящий GitHub PAT), не secrets.GITHUB_TOKEN —
автотокен Gitea валиден только для самого Gitea. Триггер workflow_run в
deploy.yml поддержан не во всех версиях Gitea Actions — см. комментарий
в файле.
Нужно завести в Gitea секрет GHCR_TOKEN (write:packages) + все остальные
секреты, что уже есть в GitHub Actions (отдельное хранилище).
55 lines
1.7 KiB
YAML
55 lines
1.7 KiB
YAML
# Копия .github/workflows/build.yml для Gitea Actions. Логин на ghcr.io — через
|
||
# secrets.GHCR_TOKEN (настоящий GitHub PAT с write:packages), не
|
||
# secrets.GITHUB_TOKEN — автотокен Gitea валиден только для самого Gitea.
|
||
name: Build & Push Image
|
||
|
||
on:
|
||
push:
|
||
branches: [main]
|
||
workflow_dispatch:
|
||
|
||
jobs:
|
||
build:
|
||
name: Build and push to GHCR
|
||
runs-on: ubuntu-latest
|
||
permissions:
|
||
contents: read
|
||
packages: write
|
||
steps:
|
||
- name: Checkout Code
|
||
uses: actions/checkout@v4
|
||
with:
|
||
lfs: true
|
||
|
||
- name: Set up Docker Buildx
|
||
uses: docker/setup-buildx-action@v3
|
||
|
||
- name: Login to GHCR
|
||
uses: docker/login-action@v3
|
||
with:
|
||
registry: ghcr.io
|
||
username: ${{ github.actor }}
|
||
password: ${{ secrets.GHCR_TOKEN }}
|
||
|
||
# Сборка Лендинга (Next.js)
|
||
- name: Build and Push Landing
|
||
uses: docker/build-push-action@v5
|
||
with:
|
||
context: .
|
||
file: ./Dockerfile
|
||
push: true
|
||
tags: ghcr.io/nineap/netrunner-landing:latest
|
||
cache-from: type=registry,ref=ghcr.io/nineap/netrunner-landing:cache
|
||
cache-to: type=registry,ref=ghcr.io/nineap/netrunner-landing:cache,mode=max
|
||
|
||
# Сборка Прокси (Rust)
|
||
- name: Build and Push Proxy
|
||
uses: docker/build-push-action@v5
|
||
with:
|
||
context: ./proxy-ws
|
||
file: ./proxy-ws/Dockerfile
|
||
push: true
|
||
tags: ghcr.io/nineap/netrunner-landing-proxy:latest
|
||
cache-from: type=registry,ref=ghcr.io/nineap/netrunner-landing-proxy:cache
|
||
cache-to: type=registry,ref=ghcr.io/nineap/netrunner-landing-proxy:cache,mode=max
|