Skip to content

Commit

Permalink
Corrected the package manifests job.
Browse files Browse the repository at this point in the history
  • Loading branch information
ebelfarsi committed Jun 28, 2024
1 parent 9917381 commit fe3dd9f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 56 deletions.
47 changes: 5 additions & 42 deletions .github/workflows/build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -426,46 +426,9 @@ jobs:
path: ${{ needs.preamble.outputs.folder_build }}/**/*.log

run-package-manifest:
needs: 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: 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.LNB_TOKEN }}
needs: [ preamble, build-docker ]
uses: ./.github/workflows/package-manifests.yml
with:
tag: ${{ needs.preamble.outputs.community_tag }}
secrets: inherit

20 changes: 6 additions & 14 deletions .github/workflows/package-manifests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Generate Package Manifest

on:
workflow_call:
inputs:
tag:
description: 'The tag to use'
required: true
type: string
secrets:
DOCKER_USERNAME:
required: true
Expand All @@ -23,24 +28,11 @@ jobs:
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
run: docker run --name package-container -e REPO_OWNER=${{ github.repository_owner }} -e REPO_NAME=HPCC-Platform -e TAG=${{ inputs.tag }} ${{ secrets.DOCKER_USERNAME }}/package-manifest:latest

- name: Fetch Output from Container
run: docker cp package-container:/app/output.json ${{ github.workspace }}/output.json
Expand Down

0 comments on commit fe3dd9f

Please sign in to comment.