frostfs-node/.forgejo/workflows/oci-image.yml
Vitaliy Potyarkin 436d65d784
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 25s
Vulncheck / Vulncheck (push) Successful in 54s
Build / Build Components (push) Successful in 1m38s
Pre-commit hooks / Pre-commit (push) Successful in 1m36s
Tests and linters / Staticcheck (push) Successful in 2m23s
Tests and linters / Lint (push) Successful in 3m18s
Tests and linters / Tests (push) Successful in 4m15s
Tests and linters / Tests with -race (push) Successful in 4m37s
OCI image / Build container images (push) Successful in 4m53s
Tests and linters / gopls check (push) Successful in 4m59s
[#1591] Build and host OCI images on our own infra
Similar to TrueCloudLab/frostfs-s3-gw#587
this PR introduces a CI pipeline that builds Docker images and pushes them
to our selfhosted registry.

Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
2025-01-16 07:46:53 +00:00

28 lines
769 B
YAML

name: OCI image
on:
push:
workflow_dispatch:
jobs:
image:
name: Build container images
runs-on: docker
container: git.frostfs.info/truecloudlab/env:oci-image-builder-bookworm
steps:
- name: Clone git repo
uses: actions/checkout@v3
- name: Build OCI image
run: make images
- name: Push image to OCI registry
run: |
echo "$REGISTRY_PASSWORD" \
| docker login --username truecloudlab --password-stdin git.frostfs.info
make push-images
if: >-
startsWith(github.ref, 'refs/tags/v') &&
(github.event_name == 'workflow_dispatch' || github.event_name == 'push')
env:
REGISTRY_PASSWORD: ${{secrets.FORGEJO_OCI_REGISTRY_PUSH_TOKEN}}