From 64eacf5a79eedba10e9ec79687d92cc30293a5ba Mon Sep 17 00:00:00 2001 From: Tobias Peters Date: Mon, 17 Jun 2024 07:39:13 +0000 Subject: [PATCH] push docker image in ci pipeline on default branch --- .github/workflows/cmake-multi-platform.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index a47f483e5e..0fbff26f67 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -151,3 +151,9 @@ jobs: name: docker path: ${{ needs.strings.outputs.build-output-dir }}/docker-* if-no-files-found: error + + - name: Push image + if: github.ref == 'refs/heads/${{ env.DEFAULT_BRANCH }}' + run: | + echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin + docker push "${{ steps.strings.outputs.docker-image-tag }}"