Skip to content

[no-relnote] COnfigure all GitHub actions as reusable workflow #1

[no-relnote] COnfigure all GitHub actions as reusable workflow

[no-relnote] COnfigure all GitHub actions as reusable workflow #1

Workflow file for this run

# Copyright 2025 NVIDIA CORPORATION
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: CI Pipeline
on:
push:
branches:
- "pull-request/[0-9]+"
- main
- release-*
jobs:
code-scanning:
uses: ./.github/workflows/code_scanning.yaml
prepare-variables:
needs: code-scanning
runs-on: ubuntu-latest
outputs:
commit_short_sha: ${{ steps.commit_short_sha.outputs.commit_short_sha }}
lowercase_repo_owner: ${{ steps.lowercase_repo_owner.outputs.value }}
build_multi_arch_images: ${{ steps.build_multi_arch_images.outputs.value }}
push_on_build: ${{ steps.docker_build_args.outputs.push_on_build }}
steps:
- name: Generate Commit Short SHA
id: commit_short_sha
run: echo "commit_short_sha=$(echo $GITHUB_SHA | cut -c1-8)" >> "$GITHUB_OUTPUT"
- name: Convert Repository Owner to Lowercase
id: lowercase_repo_owner
run: echo "lowercase_repo_owner=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')" >> $GITHUB_OUTPUT
- name: Determine Multi-Arch Build Setting
id: build_multi_arch_images
run: |
if [[ "${{ github.ref_name != 'main' && !startsWith(github.ref_name, 'release-') }}" == "true" ]]; then
echo "build_multi_arch_images=false" >> $GITHUB_OUTPUT
else
echo "build_multi_arch_images=true" >> $GITHUB_OUTPUT
fi
- name: Set Docker Build Arguments
id: docker_build_args
run: |
echo "push_on_build=true" >> $GITHUB_OUTPUT
golang:
needs: code-scanning
uses: ./.github/workflows/golang.yaml
image:
uses: ./.github/workflows/image.yaml

Check failure on line 64 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yaml

Invalid workflow file

error parsing called workflow ".github/workflows/ci.yaml" -> "./.github/workflows/image.yaml" (source branch with sha:2399526aa88aa56218732450f2e0fa708cfea2dd) : secret name `GITHUB_TOKEN` within `workflow_call` can not be used since it would collide with system reserved name
needs: prepare-variables
secrets: inherit
with:
commit_short_sha: ${{ needs.prepare-variables.outputs.commit_short_sha }}
lowercase_repo_owner: ${{ needs.prepare-variables.outputs.lowercase_repo_owner }}
build_multi_arch_images: ${{ needs.prepare-variables.outputs.build_multi_arch_images }}
push_on_build: ${{ needs.prepare-variables.outputs.push_on_build }}
e2e-test:
needs: image
secrets: inherit
uses: ./.github/workflows/e2e.yaml
with:
commit_short_sha: ${{ needs.prepare-variables.outputs.commit_short_sha }}
lowercase_repo_owner: ${{ needs.prepare-variables.outputs.lowercase_repo_owner }}