3 Commits
Author SHA1 Message Date
Georgi Manchev 9eee55162d Use runner-local Gitea registry endpoint
Publish container image / publish (push) Successful in 18s
2026-09-29 01:36:22 +03:00
Georgi Manchev 337052d8a5 Build from mirrored nginx base image
Publish container image / publish (push) Failing after 47s
2026-09-29 01:26:40 +03:00
Georgi Manchev 65cef4fa46 Publish image for native amd64 runner
Publish container image / publish (push) Failing after 46s
2026-09-29 00:49:06 +03:00
3 changed files with 27 additions and 16 deletions
+18 -12
View File
@@ -6,7 +6,7 @@ on:
- "v*.*.*" - "v*.*.*"
env: env:
REGISTRY: git.mancheff.com REGISTRY: 192.168.0.86:3000
IMAGE_NAME: hiyv-demo/hiyv-nginx IMAGE_NAME: hiyv-demo/hiyv-nginx
jobs: jobs:
@@ -38,18 +38,23 @@ jobs:
echo "tags=${image}:${version},${image}:${major_minor},${image}:${major},${image}:${GITHUB_SHA},${image}:latest" echo "tags=${image}:${version},${image}:${major_minor},${image}:${major},${image}:${GITHUB_SHA},${image}:latest"
} >> "${GITHUB_OUTPUT}" } >> "${GITHUB_OUTPUT}"
- name: Log in to the Gitea registry - name: Configure Gitea registry credentials
uses: docker/login-action@v3 shell: bash
with: env:
registry: ${{ env.REGISTRY }} REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }}
username: ${{ secrets.REGISTRY_USERNAME }} REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
password: ${{ secrets.REGISTRY_TOKEN }} run: |
mkdir -p "${HOME}/.docker"
- name: Set up QEMU auth="$(printf '%s:%s' "${REGISTRY_USERNAME}" "${REGISTRY_TOKEN}" | base64 | tr -d '\n')"
uses: docker/setup-qemu-action@v3 printf '{"auths":{"%s":{"auth":"%s"}}}\n' "${REGISTRY}" "${auth}" > "${HOME}/.docker/config.json"
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
with:
buildkitd-config-inline: |
[registry."192.168.0.86:3000"]
http = true
insecure = true
- name: Build and publish - name: Build and publish
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
@@ -58,9 +63,10 @@ jobs:
push: true push: true
build-args: | build-args: |
COMMIT_ID=${{ github.sha }} COMMIT_ID=${{ github.sha }}
NGINX_BASE=${{ env.REGISTRY }}/hiyv-demo/nginx-base:1.28-alpine-amd64
tags: ${{ steps.tags.outputs.tags }} tags: ${{ steps.tags.outputs.tags }}
labels: | labels: |
org.opencontainers.image.version=${{ steps.tags.outputs.version }} org.opencontainers.image.version=${{ steps.tags.outputs.version }}
org.opencontainers.image.revision=${{ github.sha }} org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }} org.opencontainers.image.source=https://git.mancheff.com/${{ github.repository }}
platforms: linux/amd64,linux/arm64 platforms: linux/amd64
+2 -1
View File
@@ -1,4 +1,5 @@
FROM nginx:1.28-alpine ARG NGINX_BASE=git.mancheff.com/hiyv-demo/nginx-base:1.28-alpine-amd64
FROM ${NGINX_BASE}
ARG COMMIT_ID=unknown ARG COMMIT_ID=unknown
+7 -3
View File
@@ -6,7 +6,7 @@ Git commit used to build the published container.
## Run it ## Run it
```sh ```sh
docker run --rm -p 8080:80 git.mancheff.com/hiyv-demo/hiyv-nginx:1.0.0 docker run --rm -p 8080:80 git.mancheff.com/hiyv-demo/hiyv-nginx:1.0.3
``` ```
Open <http://localhost:8080>. The health endpoint is available at Open <http://localhost:8080>. The health endpoint is available at
@@ -29,8 +29,12 @@ The Gitea Actions workflow publishes the following tags for `v1.2.3`:
- the full Git commit SHA - the full Git commit SHA
- `latest` - `latest`
The workflow publishes multi-platform images for `linux/amd64` and The workflow publishes `linux/amd64` images to
`linux/arm64` to `git.mancheff.com/hiyv-demo/hiyv-nginx`. `git.mancheff.com/hiyv-demo/hiyv-nginx`.
The pinned upstream nginx base is mirrored at
`git.mancheff.com/hiyv-demo/nginx-base:1.28-alpine-amd64` so the self-hosted
runner does not depend on Docker Hub connectivity during releases.
The repository must define two Actions secrets: `REGISTRY_USERNAME` with the The repository must define two Actions secrets: `REGISTRY_USERNAME` with the
Gitea username and `REGISTRY_TOKEN` with a personal access token that has Gitea username and `REGISTRY_TOKEN` with a personal access token that has