From df7a0e4b2e23af3329c069d69f7f1dce3970706a Mon Sep 17 00:00:00 2001 From: El Arbi Belfarsi Date: Mon, 24 Jun 2024 21:32:50 -0400 Subject: [PATCH] Added job to run package manifests docker container and upload json file. --- .github/workflows/build-assets.yml | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.github/workflows/build-assets.yml b/.github/workflows/build-assets.yml index 471bf501547..1c21b762aa5 100644 --- a/.github/workflows/build-assets.yml +++ b/.github/workflows/build-assets.yml @@ -743,3 +743,35 @@ jobs: with: name: windows-2022-logs path: ./ECLIDE/build/**/*.log + + run-package-manifest: + needs: [ preamble, build-docker ] # Ensure it runs after the necessary jobs + runs-on: ubuntu-22.04 + steps: + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} # Assuming you have stored the username in secrets + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Pull Docker Image + run: docker pull ${{ github.repository_owner }}/package-manifest:latest + + - name: Run Docker Container + run: docker run -d --name package-container -v ${{ github.workspace }}/app:/app ${{ github.repository_owner }}/package-manifest:latest + + - name: Wait for Container to Complete + run: | + while [ $(docker inspect -f '{{.State.Running}}' package-container) = "true" ]; do + sleep 10 + done + + - name: Fetch Output from Container + run: docker cp package-container:/app/output.json ${{ github.workspace }}/app/output.json + + - name: Upload output.json to Artifacts + uses: actions/upload-artifact@v2 + with: + name: output-json + path: ${{ github.workspace }}/app/output.json +