From 6a272249d03cf439534b7a28d64e52f9dfeaf4fa Mon Sep 17 00:00:00 2001 From: El Arbi Belfarsi Date: Fri, 28 Jun 2024 09:34:45 -0400 Subject: [PATCH] Added package-manifests.yml and called it as a job under build-assets.yml --- .github/workflows/build-assets.yml | 7 ++++ .github/workflows/package-manifests.yml | 47 +++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 .github/workflows/package-manifests.yml diff --git a/.github/workflows/build-assets.yml b/.github/workflows/build-assets.yml index 13138db4e0f..c329af185a7 100644 --- a/.github/workflows/build-assets.yml +++ b/.github/workflows/build-assets.yml @@ -712,3 +712,10 @@ jobs: with: name: windows-2022-logs path: ./ECLIDE/build/**/*.log + + run-package-manifest: + needs: [ preamble, build-docker ] + uses: ./.github/workflows/package-manifests.yml + with: + tag: ${{ needs.preamble.outputs.community_tag }} + secrets: inherit diff --git a/.github/workflows/package-manifests.yml b/.github/workflows/package-manifests.yml new file mode 100644 index 00000000000..f6dd9e9ba0e --- /dev/null +++ b/.github/workflows/package-manifests.yml @@ -0,0 +1,47 @@ +name: Generate Package Manifest + +on: + workflow_call: + inputs: + tag: + description: 'The tag to use' + required: true + type: string + secrets: + DOCKER_USERNAME: + required: true + DOCKER_PASSWORD: + required: true + LNB_TOKEN: + required: true + +jobs: + run-package-manifest: + runs-on: ubuntu-22.04 + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Pull Docker Image + run: docker pull ${{ secrets.DOCKER_USERNAME }}/package-manifest:latest + + - name: Run Docker Container + run: docker run --name package-container -e REPO_OWNER=${{ github.repository_owner }} -e REPO_NAME=HPCC-Platform -e TAG=${{ inputs.tag }} -e GIT_TKN=${{ secrets.LNB_TOKEN }} ebelfarsi/package-manifest:latest + + - name: Fetch Output from Container + run: docker cp package-container:/app/output.json ${{ github.workspace }}/output.json + + - name: Upload output.json to GitHub Release + uses: ncipollo/release-action@v1.14.0 + with: + allowUpdates: true + generateReleaseNotes: false + prerelease: ${{ contains(github.ref, '-rc') }} + artifacts: ${{ github.workspace }}/output.json + token: ${{ secrets.LNB_TOKEN }}