From 642fc27d329f078fd64159a31e76df59490447e3 Mon Sep 17 00:00:00 2001 From: Vitaliy Potyarkin Date: Wed, 18 Dec 2024 14:06:56 +0300 Subject: [PATCH] [#587] Build OCI images for release tags OCI images will be built often (on each PR) to make sure our recipe doesn't get rusty. Publishing to the registry will happen only for `v*` tags. Signed-off-by: Vitaliy Potyarkin --- .forgejo/workflows/oci-image.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .forgejo/workflows/oci-image.yml diff --git a/.forgejo/workflows/oci-image.yml b/.forgejo/workflows/oci-image.yml new file mode 100644 index 0000000..c5c0a2e --- /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 + + - 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}}