Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions licenses/check/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ runs:
using: "composite"
steps:
- name: Install license scanner
run:
curl https://raw.githubusercontent.com/ory/ci/master/licenses/install |
sh
run: |
ORY_CI_ROOT="${{ github.action_path }}/../.." \
sh "${{ github.action_path }}/../install"
shell: bash
- name: Check licenses
run: .bin/licenses
Expand Down
29 changes: 21 additions & 8 deletions licenses/install
Original file line number Diff line number Diff line change
@@ -1,6 +1,22 @@
#!/bin/sh
set -e

ORY_CI_REF=${ORY_CI_REF:-747531b2acc027b7308a27722efb2dc6d43377db}

install_asset() {
source_path=$1
destination=$2
mode=$3
if [ -n "${ORY_CI_ROOT:-}" ]; then
install -m "$mode" "${ORY_CI_ROOT}/licenses/${source_path}" "$destination"
return
fi
curl --fail --location --silent --show-error \
"https://raw.githubusercontent.com/ory/ci/${ORY_CI_REF}/licenses/${source_path}" \
-o "$destination"
chmod "$mode" "$destination"
}

# Default mono-install to false
FULL_INSTALL=false

Expand Down Expand Up @@ -28,12 +44,9 @@ if [ ! -d .bin ]; then
mkdir .bin
fi

curl https://raw.githubusercontent.com/ory/ci/master/licenses/license-engine.sh -o .bin/license-engine.sh
chmod +x .bin/license-engine.sh
curl https://raw.githubusercontent.com/ory/ci/master/licenses/licenses -o .bin/licenses
chmod +x .bin/licenses
curl https://raw.githubusercontent.com/ory/ci/master/licenses/list-licenses -o .bin/list-licenses
chmod +x .bin/list-licenses
install_asset license-engine.sh .bin/license-engine.sh 0755
install_asset licenses .bin/licenses 0755
install_asset list-licenses .bin/list-licenses 0755

if [ "$FULL_INSTALL" = true ] || [ -f go.mod ]; then
{
Expand All @@ -42,7 +55,7 @@ if [ "$FULL_INSTALL" = true ] || [ -f go.mod ]; then
echo
} 2>/dev/null
GOBIN="$(pwd)/.bin" go install github.com/google/go-licenses/v2@v2.0.1
curl https://raw.githubusercontent.com/ory/ci/master/licenses/license-template-go.tpl -o .bin/license-template-go.tpl
install_asset license-template-go.tpl .bin/license-template-go.tpl 0644
fi

if [ "$FULL_INSTALL" = true ] || [ -f package.json ]; then
Expand All @@ -51,5 +64,5 @@ if [ "$FULL_INSTALL" = true ] || [ -f package.json ]; then
echo "Installing the Node license checker ..."
echo
} 2>/dev/null
curl https://raw.githubusercontent.com/ory/ci/master/licenses/license-template-node.json -o .bin/license-template-node.json
install_asset license-template-node.json .bin/license-template-node.json 0644
fi
14 changes: 7 additions & 7 deletions licenses/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
token: ${{ inputs.token || github.token }}
- uses: actions/setup-go@v4
- uses: actions/setup-go@7b8cf10d4e4a01d4992d18a89f4d7dc5a3e6d6f4 # v4
with:
go-version: "1.23"
- uses: actions/setup-python@v5
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.13"
- uses: actions/setup-node@v2
- uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2
with:
node-version: "22"
- run: sudo apt-get install jq
shell: bash
- name: Install license scanner
run:
curl https://raw.githubusercontent.com/ory/ci/master/licenses/install |
sh
run: |
ORY_CI_ROOT="${{ github.action_path }}/../.." \
sh "${{ github.action_path }}/../install"
shell: bash
Loading