Files
syncer/.gitea/workflows/build.yml
Syncer Deploy 77a11840b6
Some checks failed
build / image (push) Failing after 2m9s
ci: authenticate cluster registry push
2026-08-28 10:49:04 -03:00

37 lines
950 B
YAML

name: build
on:
push:
branches: [main]
jobs:
image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Authenticate to the cluster registry
run: |
printf '%s' '${{ secrets.REGISTRY_PASSWORD }}' \
| docker login registry.a2acloud.io \
--username '${{ secrets.REGISTRY_USER }}' \
--password-stdin
- name: Build production image in Kubernetes
run: |
set -euo pipefail
image=registry.a2acloud.io/syncer/syncer
docker build --platform linux/amd64 --pull \
-t "$image:$GITHUB_SHA" \
-t "$image:latest" \
.
- name: Push immutable and release tags
run: |
set -euo pipefail
image=registry.a2acloud.io/syncer/syncer
docker push "$image:$GITHUB_SHA"
docker push "$image:latest"