Skip to content

Commit d25340c

Browse files
authored
Bump actionlint from 1.7.3 to 1.7.4 (#118)
- Bump pre-commit hooks to the latest version - Set mint 0.20.1 as default
1 parent 142fbdf commit d25340c

File tree

5 files changed

+49
-41
lines changed

5 files changed

+49
-41
lines changed

.github/workflows/functional-tests.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,18 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
os: ["ubuntu-latest", "macos-13", "macos-latest"]
22-
version: ["0.16.1", "0.17.0", "0.18.0", "0.19.0", "0.20.0-alpha.3"]
22+
version: ["0.17.0", "0.18.0", "0.19.0", "0.20.0", "0.20.1"]
2323
exclude:
24-
- os: "macos-latest"
25-
version: "0.16.1"
2624
- os: "macos-latest"
2725
version: "0.17.0"
2826
- os: "macos-latest"
2927
version: "0.18.0"
3028
- os: "macos-latest"
3129
version: "0.19.0"
30+
- os: "macos-13"
31+
version: "0.20.0"
32+
- os: "macos-13"
33+
version: "0.20.1"
3234
runs-on: ${{ matrix.os }}
3335
steps:
3436
- name: Checkout ${{ github.repository }}

.pre-commit-config.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,20 @@ repos:
2121
hooks:
2222
- id: detect-secrets
2323
- repo: https://github.com/gitleaks/gitleaks
24-
rev: v8.21.1
24+
rev: v8.21.2
2525
hooks:
2626
- id: gitleaks
2727
- repo: https://github.com/fabasoad/pre-commit-grype
2828
rev: v0.6.1
2929
hooks:
3030
- id: grype-dir
3131
args:
32-
- --grype-args=--by-cve --fail-on=low --exclude=**/node_modules
32+
- --grype-args=--by-cve --fail-on=low
3333
- --hook-args=--log-level debug
3434
stages: ["pre-push"]
3535
# Markdown
3636
- repo: https://github.com/igorshubovych/markdownlint-cli
37-
rev: v0.42.0
37+
rev: v0.43.0
3838
hooks:
3939
- id: markdownlint-fix
4040
stages: ["pre-commit"]
@@ -46,7 +46,7 @@ repos:
4646
stages: ["pre-push"]
4747
# GitHub Actions
4848
- repo: https://github.com/rhysd/actionlint
49-
rev: v1.7.3
49+
rev: v1.7.4
5050
hooks:
5151
- id: actionlint
5252
args: ["-pyflakes="]

README.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ This action sets up a [Mint](https://www.mint-lang.com/) programming language.
1111
## Supported OS
1212

1313
<!-- prettier-ignore-start -->
14-
| OS | Arch | |
15-
|---------|--------|---------------------------------|
16-
| Windows | All | :x: |
17-
| Linux | x86_84 | :white_check_mark: |
18-
| Linux | arm | :x: |
19-
| macOS | x86_84 | :white_check_mark: |
20-
| macOS | arm | :white_check_mark: `(> 0.19.x)` |
14+
| OS | Arch | |
15+
|---------|--------|----------------------------------|
16+
| Windows | All | :x: |
17+
| Linux | x86_84 | :white_check_mark: |
18+
| Linux | arm | :x: |
19+
| macOS | x86_84 | :white_check_mark: |
20+
| macOS | arm | :white_check_mark: `(>= 0.20.0)` |
2121
<!-- prettier-ignore-end -->
2222

2323
## Prerequisites
@@ -27,9 +27,9 @@ None
2727
## Inputs
2828

2929
<!-- prettier-ignore-start -->
30-
| Name | Required | Description | Default | Possible values |
31-
|---------|----------|-----------------------------------------------------------------------------------|------------------|--------------------------|
32-
| version | No | Mint version that can be found [here](https://github.com/mint-lang/mint/releases) | `0.20.0-alpha.3` | `0.19.0`, `0.18.0`, etc. |
30+
| Name | Required | Description | Default | Possible values |
31+
|---------|----------|-----------------------------------------------------------------------------------|----------|--------------------------|
32+
| version | No | Mint version that can be found [here](https://github.com/mint-lang/mint/releases) | `0.20.1` | `0.19.0`, `0.18.0`, etc. |
3333
<!-- prettier-ignore-end -->
3434

3535
## Example usage

action.yml

+9-10
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@ inputs:
99
version:
1010
description: "Mint version"
1111
required: false
12-
default: "0.20.0-alpha.3"
12+
default: "0.20.1"
1313
runs:
1414
using: "composite"
1515
steps:
1616
- name: Fail
1717
if: (runner.os == 'Windows'
18-
|| (runner.os == 'Linux' && runner.arch == 'ARM')
19-
|| (runner.os == 'Linux' && runner.arch == 'ARM64'))
18+
|| (runner.os == 'Linux' && startsWith(runner.arch, 'ARM')))
2019
run: |
2120
echo "::error title=OS is not supported::${RUNNER_OS} ${RUNNER_ARCH} is not supported"
2221
exit 1
@@ -25,25 +24,25 @@ runs:
2524
id: info
2625
env:
2726
INPUT_VERSION: "${{ inputs.version }}"
28-
run: ./collect-info.sh
27+
run: ./collect-info.sh "${INPUT_VERSION}"
2928
shell: sh
3029
working-directory: "${{ github.action_path }}/src"
3130
- name: Download
32-
if: ${{ steps.info.outputs.MINT_INSTALLED == 'false' }}
31+
if: ${{ steps.info.outputs.mint-installed == 'false' }}
3332
uses: robinraju/[email protected]
3433
with:
3534
repository: mint-lang/mint
3635
latest: false
3736
tag: ${{ inputs.version }}
38-
fileName: ${{ steps.info.outputs.MINT_BINARY }}
37+
fileName: ${{ steps.info.outputs.mint-binary }}
3938
tarBall: false
4039
zipBall: false
4140
out-file-path: mint
4241
- name: Install
43-
if: ${{ steps.info.outputs.MINT_INSTALLED == 'false' }}
42+
if: ${{ steps.info.outputs.mint-installed == 'false' }}
4443
run: |
45-
mv "${{ steps.info.outputs.MINT_BINARY }}" mint
44+
mv "${{ steps.info.outputs.mint-binary }}" mint
4645
chmod +x mint
47-
echo "${{ steps.info.outputs.MINT_PATH }}" >> "$GITHUB_PATH"
46+
echo "${{ steps.info.outputs.mint-path }}" >> "$GITHUB_PATH"
4847
shell: sh
49-
working-directory: ${{ steps.info.outputs.MINT_PATH }}
48+
working-directory: ${{ steps.info.outputs.mint-path }}

src/collect-info.sh

+21-14
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
# Starting from v0.20.0-alpha.1 mint supports macos arm64 OS. This function
44
# checks if requested version is less than 0.20.x
5-
if_old_version() {
6-
version="$1"
5+
_if_old_version() {
6+
version="${1}"
7+
78
major=$(echo "$version" | cut -d '.' -f 1)
89
minor=$(echo "$version" | cut -d '.' -f 2)
910
if [ "$major" -lt 1 ] && [ "$minor" -lt 20 ]; then
@@ -14,30 +15,36 @@ if_old_version() {
1415
}
1516

1617
main() {
17-
echo "MINT_INSTALLED=$(if command -v mint >/dev/null 2>&1; then echo true; else echo false; fi)" >> "$GITHUB_OUTPUT"
18-
mkdir -p "$GITHUB_WORKSPACE/mint"
19-
echo "MINT_PATH=$GITHUB_WORKSPACE/mint" >> "$GITHUB_OUTPUT"
18+
input_version="${1}"
19+
20+
echo "mint-installed=$(if command -v mint >/dev/null 2>&1; then echo true; else echo false; fi)" >> "$GITHUB_OUTPUT"
21+
mkdir -p "${GITHUB_WORKSPACE}/mint"
22+
echo "mint-path=${GITHUB_WORKSPACE}/mint" >> "$GITHUB_OUTPUT"
2023
if [ "${RUNNER_OS}" = "Linux" ]; then
21-
MINT_BINARY=mint-${INPUT_VERSION}-linux
24+
if [ "$(_if_old_version "${input_version}")" = "true" ]; then
25+
mint_binary="mint-${input_version}-linux"
26+
else
27+
mint_binary="mint-${input_version}-linux-x86_64"
28+
fi
2229
else
2330
if [ "${RUNNER_ARCH#ARM}" != "$RUNNER_ARCH" ]; then
24-
if [ "$(if_old_version "${INPUT_VERSION}")" = "true" ]; then
25-
msg="${RUNNER_OS} ${RUNNER_ARCH} is not supported by mint ${INPUT_VERSION}."
26-
msg="${msg} Try newer version of mint (> 0.19.x)."
31+
if [ "$(_if_old_version "${input_version}")" = "true" ]; then
32+
msg="${RUNNER_OS} ${RUNNER_ARCH} is not supported by mint ${input_version}."
33+
msg="${msg} Try newer version of mint (>= 0.20.0)."
2734
echo "::error title=OS is not supported::${msg}"
2835
exit 1
2936
else
30-
MINT_BINARY=mint-${INPUT_VERSION}-macos-latest
37+
mint_binary="mint-${input_version}-osx-arm64"
3138
fi
3239
else
33-
if [ "$(if_old_version "${INPUT_VERSION}")" = "true" ]; then
34-
MINT_BINARY=mint-${INPUT_VERSION}-osx
40+
if [ "$(_if_old_version "${input_version}")" = "true" ]; then
41+
mint_binary="mint-${input_version}-osx"
3542
else
36-
MINT_BINARY=mint-${INPUT_VERSION}-macos-13
43+
mint_binary="mint-${input_version}-osx-x86_64"
3744
fi
3845
fi
3946
fi
40-
echo "MINT_BINARY=$MINT_BINARY" >> "$GITHUB_OUTPUT"
47+
echo "mint-binary=${mint_binary}" >> "$GITHUB_OUTPUT"
4148
}
4249

4350
main "$@"

0 commit comments

Comments
 (0)