-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump rhysd/actionlint from 1.6.27 to 1.7.0 (#115)
- Loading branch information
Showing
6 changed files
with
64 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,12 +9,14 @@ inputs: | |
version: | ||
description: "Mint version" | ||
required: false | ||
default: "0.19.0" | ||
default: "0.20.0-alpha.1" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Fail | ||
if: ${{ runner.os == 'Windows' || runner.arch == 'ARM' || runner.arch == 'ARM64' }} | ||
if: (runner.os == 'Windows' | ||
|| (runner.os == 'Linux' && runner.arch == 'ARM') | ||
|| (runner.os == 'Linux' && runner.arch == 'ARM64')) | ||
run: | | ||
echo "::error title=OS is not supported::${RUNNER_OS} ${RUNNER_ARCH} is not supported" | ||
exit 1 | ||
|
@@ -23,17 +25,9 @@ runs: | |
id: info | ||
env: | ||
INPUT_VERSION: "${{ inputs.version }}" | ||
run: | | ||
echo "MINT_INSTALLED=$(if command -v mint >/dev/null 2>&1; then echo true; else echo false; fi)" >> "$GITHUB_OUTPUT" | ||
mkdir -p "$GITHUB_WORKSPACE/mint" | ||
echo "MINT_PATH=$GITHUB_WORKSPACE/mint" >> "$GITHUB_OUTPUT" | ||
if [ "${RUNNER_OS}" = "Linux" ]; then | ||
MINT_BINARY=mint-${INPUT_VERSION}-linux | ||
else | ||
MINT_BINARY=mint-${INPUT_VERSION}-osx | ||
fi | ||
echo "MINT_BINARY=$MINT_BINARY" >> "$GITHUB_OUTPUT" | ||
run: ./collect-info.sh | ||
shell: sh | ||
working-directory: "${{ github.action_path }}/src" | ||
- name: Download | ||
if: ${{ steps.info.outputs.MINT_INSTALLED == 'false' }} | ||
uses: robinraju/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env sh | ||
|
||
# Starting from v0.20.0-alpha.1 mint supports macos arm64 OS. This function | ||
# checks if requested version is less than 0.20.x | ||
if_old_version() { | ||
version="$1" | ||
major=$(echo "$version" | cut -d '.' -f 1) | ||
minor=$(echo "$version" | cut -d '.' -f 2) | ||
if [ "$major" -lt 1 ] && [ "$minor" -lt 20 ]; then | ||
echo "true" | ||
else | ||
echo "false" | ||
fi | ||
} | ||
|
||
echo "MINT_INSTALLED=$(if command -v mint >/dev/null 2>&1; then echo true; else echo false; fi)" >> "$GITHUB_OUTPUT" | ||
mkdir -p "$GITHUB_WORKSPACE/mint" | ||
echo "MINT_PATH=$GITHUB_WORKSPACE/mint" >> "$GITHUB_OUTPUT" | ||
if [ "${RUNNER_OS}" = "Linux" ]; then | ||
MINT_BINARY=mint-${INPUT_VERSION}-linux | ||
else | ||
if [ "${RUNNER_ARCH#ARM}" != "$RUNNER_ARCH" ]; then | ||
if [ "$(if_old_version "${INPUT_VERSION}")" = "true" ]; then | ||
msg="${RUNNER_OS} ${RUNNER_ARCH} is not supported by mint ${INPUT_VERSION}." | ||
msg="${msg} Try newer version of mint (> 0.19.x)." | ||
echo "::error title=OS is not supported::${msg}" | ||
exit 1 | ||
else | ||
MINT_BINARY=mint-${INPUT_VERSION}-macos-latest | ||
fi | ||
else | ||
if [ "$(if_old_version "${INPUT_VERSION}")" = "true" ]; then | ||
MINT_BINARY=mint-${INPUT_VERSION}-osx | ||
else | ||
MINT_BINARY=mint-${INPUT_VERSION}-macos-13 | ||
fi | ||
fi | ||
fi | ||
echo "MINT_BINARY=$MINT_BINARY" >> "$GITHUB_OUTPUT" |