Files
how-to-make-docker-image/.github/workflows/docker-publish.yml
T
volochay c8d9717f5b
Publish Docker image to GHCR / build-and-push (push) Failing after 47s
Обновить .github/workflows/docker-publish.yml
2026-07-22 14:00:57 +00:00

36 lines
792 B
YAML

name: Publish Docker image to GHCR
on:
push:
branches:
- main
release:
types: [published]
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: gitea.viaproger.ru
username: ${{ github.actor }}
password: ${{ secrets.registry_password }}
- name: Build Docker image
run: |
docker build -t gitea.viaproger.ru/${{ github.actor }}/my-image:latest .
- name: Push Docker image
run: |
docker push gitea.viaproger.ru/${{ github.actor }}/my-image:latest