Skip to content

Commit

Permalink
Added package-manifests.yml and called it as a job under build-assets…
Browse files Browse the repository at this point in the history
….yml
  • Loading branch information
ebelfarsi committed Jun 28, 2024
1 parent 14a08e9 commit 6a27224
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
47 changes: 47 additions & 0 deletions .github/workflows/package-manifests.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
allowUpdates: true
generateReleaseNotes: false
prerelease: ${{ contains(github.ref, '-rc') }}
artifacts: ${{ github.workspace }}/output.json
token: ${{ secrets.LNB_TOKEN }}

0 comments on commit 6a27224

Please sign in to comment.