diff --git a/.env b/.env index 26a7295..b28971b 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ FROSTFS_HUB_IMAGE=truecloudlab/frostfs -AIO_IMAGE=truecloudlab/frostfs-aio +AIO_IMAGE=git.frostfs.info/truecloudlab/frostfs-aio AIO_VERSION=1.6.5 FROSTFS_CORE_TAG=0.42.15 diff --git a/.forgejo/workflows/oci-image.yml b/.forgejo/workflows/oci-image.yml new file mode 100644 index 0000000..31c1200 --- /dev/null +++ b/.forgejo/workflows/oci-image.yml @@ -0,0 +1,27 @@ +on: + pull_request: + push: + workflow_dispatch: + +jobs: + image: + name: OCI image + 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 image-aio + + - name: Push image to OCI registry + run: | + echo "$REGISTRY_PASSWORD" \ + | docker login --username truecloudlab --password-stdin git.frostfs.info + make image-push + 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}} diff --git a/Makefile b/Makefile index abe06f1..4a6468d 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ REPO=$(notdir $(shell pwd)) VERSION ?= "$(shell git describe --tags --match "v*" 2>/dev/null || git rev-parse --short HEAD | sed 's/^v//')" # Variables for docker -AIO_IMAGE ?= "truecloudlab/frostfs-aio" +AIO_IMAGE ?= "git.frostfs.info/truecloudlab/frostfs-aio" LOG_DIR ?= "/var/log" # Variables for compose @@ -61,6 +61,12 @@ image-aio-custom: --build-arg NEOGO_TAG=$(NEOGO_TAG) \ -t $(AIO_IMAGE):$(AIO_VERSION) . +# Push aio Docker image to the registry +.PHONY: image-push +image-push: + @echo "⇒ Publish image" + @docker push $(AIO_IMAGE):$(AIO_VERSION) + # Start AIO up: @$(COMPOSE_CMD_UP)