From 958a04356242b7183dcd4d16b9ad7e670d60f48c Mon Sep 17 00:00:00 2001 From: "Misha M.-Kupriyanov" Date: Tue, 26 Nov 2024 12:26:30 +0100 Subject: [PATCH] IONOS(ci): split action to build and push to ghcr.io in order to be able to define different targets Signed-off-by: Misha M.-Kupriyanov --- .github/workflows/hidrive-next-build.yml | 31 ++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/hidrive-next-build.yml b/.github/workflows/hidrive-next-build.yml index a72ab8fab5efa..2335085c36a07 100644 --- a/.github/workflows/hidrive-next-build.yml +++ b/.github/workflows/hidrive-next-build.yml @@ -96,6 +96,35 @@ jobs: - name: Zip dependencies run: make -f IONOS/Makefile zip_dependencies TARGET_PACKAGE_NAME=${{ env.TARGET_PACKAGE_NAME }} + - name: Upload artifact result for job hidrive-next-build + uses: actions/upload-artifact@v4 + with: + name: hidrive_next_build_zip + path: ${{ env.TARGET_PACKAGE_NAME }} + + - name: Show changes on failure + if: failure() + run: | + git status + git --no-pager diff + exit 1 # make it red to grab attention + + hidirve-next-artifact-to-ghcr_io: + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + + name: Push artifact to ghcr.io + needs: hidrive-next-build + + steps: + - name: Download artifact zip + uses: actions/download-artifact@v4 + with: + name: hidrive_next_build_zip + - name: Log in to the Container registry uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 with: @@ -134,6 +163,4 @@ jobs: - name: Show changes on failure if: failure() run: | - git status - git --no-pager diff exit 1 # make it red to grab attention