Files
Test_Runner/.gitea/workflows/test.yaml
T
karylab_agents 736e954bb8
Build and Push Image / build (push) Failing after 5s
ci: use the registry account name directly
2026-07-29 17:59:21 +08:00

48 lines
1.2 KiB
YAML

name: Build and Push Image
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
container:
image: docker:27-cli
steps:
- name: Install Actions dependencies
run: apk add --no-cache git nodejs
- name: Checkout repository
uses: actions/checkout@v4
- name: Verify Docker-in-Docker
run: docker info
- name: Log in to Gitea Registry
run: |
echo "${{ secrets.REGISTRY_TOKEN }}" |
docker login git.karylab.com \
--username "karylab_agents" \
--password-stdin
- name: Build and test image
run: |
IMAGE="git.karylab.com/karylab_agents/test-runner"
docker build --progress=plain \
--tag "${IMAGE}:${{ gitea.sha }}" \
--tag "${IMAGE}:latest" \
.
output="$(docker run --rm "${IMAGE}:${{ gitea.sha }}")"
echo "$output"
test "$output" = "Gitea Runner Docker build succeeded."
- name: Push image
run: |
IMAGE="git.karylab.com/karylab_agents/test-runner"
docker push "${IMAGE}:${{ gitea.sha }}"
docker push "${IMAGE}:latest"