DataDesigner/.github/workflows/pack-tutorials.yml
oliver könig 8ca8e2447b
ci: upgrade GitHub Actions for Node.js 24 compatibility (#450)
* ci: upgrade GitHub Actions for Node.js 24 compatibility

Upgrades actions to versions compatible with the Node.js 24 runtime:
- actions/checkout: → v6
- actions/upload-artifact: → v6
- actions/download-artifact: → v7
- actions/github-script: → v8
- actions/setup-python: → v6

Mirrors: 1d5e68b074
Signed-off-by: oliver könig <okoenig@nvidia.com>

* ci: also upgrade actions/cache and astral-sh/setup-uv to node24-compatible versions

- actions/cache: v4 → v5 in build-notebooks.yml
- astral-sh/setup-uv: v5/v6 → v7 in ci.yml, check-colab-notebooks.yml, health-checks.yml, build-docs.yml, build-notebooks.yml

Addresses: https://github.com/NVIDIA-NeMo/DataDesigner/pull/450#issuecomment-4154872141

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Signed-off-by: oliver könig <okoenig@nvidia.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Andre Manoel <165937436+andreatgretel@users.noreply.github.com>
2026-03-30 17:39:05 -03:00

77 lines
2.4 KiB
YAML

name: Pack tutorials
on:
workflow_dispatch:
release:
types: [published]
jobs:
build-notebooks:
uses: ./.github/workflows/build-notebooks.yml
secrets: inherit
zip-and-upload:
needs: build-notebooks
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download artifact from previous step
uses: actions/download-artifact@v7
with:
name: notebooks
path: data_designer_tutorial
- name: Set up environment variables
id: env_setup
run: |
echo "SOURCE_FOLDER_PATH=data_designer_tutorial" >> $GITHUB_ENV
echo "ZIP_FILE_NAME=data_designer_tutorial.zip" >> $GITHUB_ENV
- name: Check if source folder exists
run: |
if [ ! -d "${{ env.SOURCE_FOLDER_PATH }}" ]; then
echo "::error::Source folder '${{ env.SOURCE_FOLDER_PATH }}' not found. Check the input value."
exit 1
fi
- name: Zip the target folder
run: |
zip -r ${{ env.ZIP_FILE_NAME }} ${{ env.SOURCE_FOLDER_PATH }}
echo "Successfully created ${{ env.ZIP_FILE_NAME }}"
- name: Find the latest existing release tag
id: get_release
run: |
if [ "${{ github.event_name }}" == "release" ]; then
LATEST_TAG="${{ github.event.release.tag_name }}"
else
echo "::notice::Running manually via workflow_dispatch. Fetching latest release tag..."
gh auth status || echo "GitHub CLI is not authenticated, relying on GITHUB_TOKEN."
# We use tr -d '\n' to remove the trailing newline for a clean tag string
LATEST_TAG=$(gh release view --json tagName -q .tagName 2>/dev/null)
if [ -z "$LATEST_TAG" ]; then
echo "::error::Could not find the latest published release tag. Ensure a release exists."
exit 1
fi
fi
echo "Latest release tag found: $LATEST_TAG"
echo "tag=$LATEST_TAG" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload zip file as release asset
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.get_release.outputs.tag }}
files: ${{ env.ZIP_FILE_NAME }}
draft: false
prerelease: false
- name: Cleanup
if: always()
run: rm -f ${{ env.ZIP_FILE_NAME }}