-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds workflow summary, misc workflow changes
- Loading branch information
Showing
9 changed files
with
165 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
## This workflow run was built with the following packages: | ||
<br> | ||
|
||
| Name | Version | Notes | | ||
| :-- | :-- | :-- | | ||
| amalgam | {amalgam-version} | {amalgam-notes} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Reusable WF - Output Workflow Summary | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
payload: | ||
type: string | ||
required: true | ||
build-type: | ||
type: string | ||
required: true | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
|
||
output-summary: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Download Artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
path: ./tmp | ||
|
||
- name: Clean up dir | ||
run: | | ||
mkdir -p dist | ||
mkdir -p amlg | ||
find ./tmp -type f -name '*.whl' -exec mv -t ./amlg {} + | ||
- name: Generate workflow summary | ||
env: | ||
GH_TOKEN: ${{ secrets.HOWSOAI_WORKFLOW_AUTOMATION_CLASSIC_TOKEN }} | ||
run: | | ||
pip install --user amlg/*-py3-none-any.whl | ||
site_packages=$(python -m site --user-site) | ||
if [[ $(cat $site_packages/amalgam/lib/version.json | jq 'has(".version.amalgam_build_date")') == true ]]; then | ||
# Get amalgam build title and date | ||
build_date=$(jq -r '.version."amalgam_build_date"' $site_packages/amalgam/lib/version.json) | ||
build_date=$(python -c "from datetime import datetime; print(datetime.strptime($build_date, '%Y-%m-%dT%H:%M:%SZ').strftime('%A, %B %d, %I:%M %p'))") | ||
amlg_version=$(jq -r '.version."amalgam_display_title"' $site_packages/amalgam/lib/version.json) | ||
amlg_version=$(echo "$amlg_version ($build_date)") | ||
amlg_notes=$(echo "Prerelease version") | ||
else | ||
# Get amalgam release version | ||
amlg_version=$(jq -r '.version.amalgam' $site_packages/amalgam/lib/version.json) | ||
amlg_notes=$(echo "Release version specified in \`version.json\`") | ||
fi | ||
# amalgam notes | ||
sed -i "s|{amalgam-version}|$amlg_version|g" ./.github/templates/version_summary.md | ||
sed -i "s|{amalgam-notes}|$amlg_notes|g" ./.github/templates/version_summary.md | ||
# Remove unecessary quotations from variable substitutions | ||
sed -i "s|\"||g" ./.github/templates/version_summary.md | ||
# Output filled template file to workflow summary | ||
cat ./.github/templates/version_summary.md >> $GITHUB_STEP_SUMMARY |
Oops, something went wrong.