Skip to content

Commit

Permalink
Seperate package manifests job
Browse files Browse the repository at this point in the history
  • Loading branch information
ebelfarsi committed Jun 27, 2024
1 parent aadc844 commit aded606
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 29 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -426,33 +426,4 @@ jobs:
path: ${{ needs.preamble.outputs.folder_build }}/**/*.log


run-package-manifest:
needs: [preamble, build-docker]
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 ${{ github.repository_owner }}/package-manifest:latest

- name: Run Docker Container
run: docker run --name package-container ${{ github.repository_owner }}/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.GITHUB_TOKEN }}
5 changes: 5 additions & 0 deletions .github/workflows/build-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,8 @@ jobs:
cmake-configuration-ex: '-DUSE_CPPUNIT=OFF -DCLIENTTOOLS_ONLY=ON -DINCLUDE_PLUGINS=OFF -DUSE_AZURE=OFF -DUSE_CASSANDRA=OFF -DUSE_PARQUET=OFF -DSUPPRESS_CASSANDRAEMBED=ON -DUSE_JAVA=OFF -DUSE_OPENLDAP=OFF'
secrets: inherit

run-package-manifest:
if: ${{ contains('workflow_dispatch', github.event_name) }}
needs: build-workflow-dispatch
uses: ./.github/workflows/package-manifests.yml
secrets: inherit
55 changes: 55 additions & 0 deletions .github/workflows/package-manifests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Generate Package Manifest

on:
workflow_call:
secrets:
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true
GITHUB_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: Determine Tag
id: determine_tag
run: |
if [ "${{ github.ref }}" == "refs/tags/"* ]; then
echo "TAG=${{ github.ref }}" | sed 's/refs\/tags\///' >> $GITHUB_ENV
else
echo "No tag found."
exit 1
fi
- name: Print determined tag
run: echo "Determined tag is ${{ env.TAG }}"

- 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=${{ env.TAG }} ${{ secrets.DOCKER_USERNAME }}/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.GITHUB_TOKEN }}

0 comments on commit aded606

Please sign in to comment.