mirror of
https://github.com/github/codeql-action.git
synced 2025-12-27 01:30:10 +08:00
For more information see https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ This change bumps a bunch of the internal actions packages. Note that the only required version change is `actions/core` to 1.10.0. The others are not required, but seem like a reasonable idea. It also changes all of the workflows that use `set-output`.
39 lines
1.7 KiB
YAML
39 lines
1.7 KiB
YAML
name: "Prepare test"
|
|
description: Performs some preparation to run tests
|
|
inputs:
|
|
version:
|
|
required: true
|
|
outputs:
|
|
tools-url:
|
|
value: ${{ steps.get-url.outputs.tools-url }}
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Move codeql-action
|
|
shell: bash
|
|
run: |
|
|
mkdir ../action
|
|
mv * .github ../action/
|
|
mv ../action/tests/multi-language-repo/{*,.github} .
|
|
mv ../action/.github/workflows .github
|
|
- id: get-url
|
|
name: Determine URL
|
|
shell: bash
|
|
run: |
|
|
if [[ ${{ inputs.version }} == "nightly-latest" ]]; then
|
|
export LATEST=`gh release list --repo dsp-testing/codeql-cli-nightlies -L 1 | cut -f 3`
|
|
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/$LATEST/codeql-bundle.tar.gz" >> $GITHUB_OUTPUT
|
|
elif [[ ${{ inputs.version }} == *"nightly"* ]]; then
|
|
export VERSION=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
|
|
echo "tools-url=https://github.com/dsp-testing/codeql-cli-nightlies/releases/download/codeql-bundle-$VERSION-manual/codeql-bundle.tar.gz" >> $GITHUB_OUTPUT
|
|
elif [[ ${{ inputs.version }} == *"stable"* ]]; then
|
|
export VERSION=`echo ${{ inputs.version }} | sed -e 's/^.*\-//'`
|
|
echo "tools-url=https://github.com/github/codeql-action/releases/download/codeql-bundle-$VERSION/codeql-bundle.tar.gz" >> $GITHUB_OUTPUT
|
|
elif [[ ${{ inputs.version }} == "latest" ]]; then
|
|
echo "tools-url=latest" >> $GITHUB_OUTPUT
|
|
elif [[ ${{ inputs.version }} == "cached" ]]; then
|
|
echo "tools-url=" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "::error Unrecognized version specified!"
|
|
fi
|