Skip to content

use 'main' of gha-tools #2

use 'main' of gha-tools

use 'main' of gha-tools #2

on:
workflow_call:
inputs:
build_type:
description: "One of: [branch, nightly, pull-request]"
required: true
type: string
branch:
description: |
Git branch the workflow run targets.
This is required even when 'sha' is provided because it is also used for organizing artifacts.
type: string
date:
description: "Date (YYYY-MM-DD) this run is for. Used to organize artifacts produced by nightly builds"
type: string
sha:
description: "Full git commit SHA to check out"
type: string
repo:
description: "Git repo to check out, in '{org}/{repo}' form, e.g. 'rapidsai/cudf'"
type: string
skip_upload_pkgs:
description: |
Space-delimited string of package names to skip uploading to anaconda.org.
When this is empty (the default), all conda packages found in CI artifacts for a given
run will be uploaded to anaconda.org
type: string
upload_to_label:
description: The label that should be applied to packages uploaded to Anaconda.org
type: string
default: main
build_workflow_name:
description: |
Name of a workflow file that produced artifacts to be downloaded in this run.
If not set (the default), artifact-handling scripts use RAPIDS-conventional defaults (like "build.yaml" when "build_type == nightly").
required: false
type: string
secrets:
CONDA_RAPIDSAI_TOKEN:
description: "Anaconda token for RAPIDS conda release uploads"
required: false
CONDA_RAPIDSAI_NIGHTLY_TOKEN:
description: "Anaconda token for RAPIDS conda nightly uploads"
required: false
defaults:
run:
shell: bash
permissions:
actions: read
checks: none
contents: read
deployments: none
discussions: none
id-token: write
issues: none
packages: read
pages: none
pull-requests: read
repository-projects: none
security-events: none
statuses: none
jobs:
upload:
runs-on: linux-amd64-cpu4
container:
image: "python:3.14-slim"
env:
RAPIDS_BUILD_TYPE: ${{ inputs.build_type }}
steps:
- name: Setup proxy cache
uses: nv-gha-runners/setup-proxy-cache@main
continue-on-error: true
with:
enable-apt: true
- name: Install tools
run: |
# install tools needed to bootstrap others
apt-get update
apt-get install -y --no-install-recommends \
curl \
git
# install gha-tools
git clone --depth 1 https://github.com/rapidsai/gha-tools /tmp/gha-tools

Check failure on line 90 in .github/workflows/conda-upload-packages.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/conda-upload-packages.yaml

Invalid workflow file

You have an error in your yaml syntax on line 90
echo "/tmp/gha-tools/tools" >> "${GITHUB_PATH}"
export PATH="/tmp/gha-tools/tools:${PATH}"
# set up source for latest 'gh' releases
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list
# install tools with system package manager
apt-get update
apt-get install -y --no-install-recommends \
gh \
jq
# anaconda client (for 'rapids-upload-to-anaconda-github')
rapids-pip-retry install \
--prefer-binary \
'anaconda-client>=1.13.1'
- name: Standardize repository information
uses: rapidsai/shared-actions/rapids-github-info@main
with:
repo: ${{ inputs.repo }}
branch: ${{ inputs.branch }}
build_workflow_name: ${{ inputs.build_workflow_name }}
date: ${{ inputs.date }}
# On 'push' or 'tag', 'inputs.sha' is null.
# Fall back to 'github.sha' to avoid needing a repo checkout.
sha: ${{ inputs.sha || github.sha }}
# Per the docs at https://docs.github.com/en/rest/rate-limit/rate-limit?apiVersion=2022-11-28#get-rate-limit-status-for-the-authenticated-user,
# checking '/rate_limit | jq .' should not itself count against any rate limits.
- name: Check GitHub API rate limits
run: |
gh api /rate_limit | jq .
env:
GH_TOKEN: ${{ github.token }}
- name: Set Proper Conda Upload Token
run: |
RAPIDS_CONDA_TOKEN=${{ secrets.CONDA_RAPIDSAI_NIGHTLY_TOKEN }}
if rapids-is-release-build; then
RAPIDS_CONDA_TOKEN=${{ secrets.CONDA_RAPIDSAI_TOKEN }}
fi
echo "RAPIDS_CONDA_TOKEN=${RAPIDS_CONDA_TOKEN}" >> "${GITHUB_ENV}"
- name: Upload packages
run: rapids-upload-to-anaconda-github
env:
SKIP_UPLOAD_PKGS: ${{ inputs.skip_upload_pkgs }}
RAPIDS_CONDA_UPLOAD_LABEL: ${{ inputs.upload_to_label }}
GH_TOKEN: ${{ github.token }}