Skip to content

40 files changed

+315
-1906
lines changed

action_metadata_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ func TestLocalActionsParsingSkipped(t *testing.T) {
228228
{
229229
what: "not a local action",
230230
proj: &Project{"", nil},
231-
spec: "actions/checkout@v3",
231+
spec: "actions/checkout@v4",
232232
},
233233
{
234234
what: "action does not exist (#25, #40)",

docs/checks.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ jobs:
512512
# ERROR: The step is not run yet at this point
513513
- run: echo ${{ steps.cache.outputs.cache-hit }}
514514
# actions/cache sets cache-hit output
515-
- uses: actions/cache@v3
515+
- uses: actions/cache@v4
516516
id: cache
517517
with:
518518
key: ${{ hashFiles('**/*.lock') }}
@@ -1755,7 +1755,7 @@ jobs:
17551755
test:
17561756
runs-on: ubuntu-latest
17571757
steps:
1758-
- uses: actions/cache@v3
1758+
- uses: actions/cache@v4
17591759
with:
17601760
keys: |
17611761
${{ hashFiles('**/*.lock') }}
@@ -1767,28 +1767,28 @@ jobs:
17671767
Output:
17681768

17691769
```
1770-
test.yaml:7:15: missing input "key" which is required by action "actions/cache@v3". all required inputs are "key", "path" [action]
1770+
test.yaml:7:15: missing input "key" which is required by action "actions/cache@v4". all required inputs are "key", "path" [action]
17711771
|
1772-
7 | - uses: actions/cache@v3
1772+
7 | - uses: actions/cache@v4
17731773
| ^~~~~~~~~~~~~~~~
1774-
test.yaml:9:11: input "keys" is not defined in action "actions/cache@v3". available inputs are "key", "path", "restore-keys", "upload-chunk-size" [action]
1774+
test.yaml:9:11: input "keys" is not defined in action "actions/cache@v4". available inputs are "key", "path", "restore-keys", "upload-chunk-size" [action]
17751775
|
17761776
9 | keys: |
17771777
| ^~~~~
17781778
```
17791779

17801780
[Playground](https://rhysd.github.io/actionlint#eJyFj0EKwjAQRfc9xV8I1UJbcJmVK+8xDYOpqUlwEkVq725apYgbV8PMe/Dne6cQkpiiOPtOVAFEljhP4Jqc1D4LqUsupnqgmS1IIgd5W0CNJCwKpGPvnbSatOHDbf/BwL2PRq0bYPmR9efXBdiMIwyJOfYDy7asqrZqBq9tucM0/TWXyF81UI5F0wbSlk4s67u5mMKFLL8A+h9EEw==)
17811781

1782-
actionlint checks inputs of many popular actions such as `actions/checkout@v3`. It checks
1782+
actionlint checks inputs of many popular actions such as `actions/checkout@v4`. It checks
17831783

17841784
- some input is required by the action but it is not set at `with:`
17851785
- input set at `with:` is not defined in the action (this commonly occurs by a typo)
17861786

17871787
this is done by checking `with:` section items with a small database collected at building `actionlint` binary. actionlint
17881788
can check popular actions without fetching any `action.yml` of the actions from the remote so that it can run efficiently.
17891789

1790-
Note that it only supports the case of specifying major versions like `actions/checkout@v3`. Fixing version of action like
1791-
`actions/checkout@v3.0.2` and using the HEAD of action like `actions/checkout@main` are not supported for now.
1790+
Note that it only supports the case of specifying major versions like `actions/checkout@v4`. Fixing version of action like
1791+
`actions/checkout@v4.0.1` and using the HEAD of action like `actions/checkout@main` are not supported for now.
17921792

17931793
So far, actionlint supports more than 100 popular actions The data set is embedded at [`popular_actions.go`](../popular_actions.go)
17941794
and were automatically collected by [a script][generate-popular-actions]. If you want more checks for other actions, please
@@ -1806,27 +1806,27 @@ jobs:
18061806
test:
18071807
runs-on: ubuntu-latest
18081808
steps:
1809-
# ERROR: actions/checkout@v2 is using the outdated runner 'node12'
1810-
- uses: actions/checkout@v2
1809+
# ERROR: actions/checkout@v3 is using the outdated runner 'node16'
1810+
- uses: actions/checkout@v3
18111811
```
18121812

18131813
Output:
18141814

18151815
```
1816-
test.yaml:8:15: the runner of "actions/checkout@v2" action is too old to run on GitHub Actions. update the action's version to fix this issue [action]
1816+
test.yaml:8:15: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue [action]
18171817
|
1818-
8 | - uses: actions/checkout@v2
1818+
8 | - uses: actions/checkout@v3
18191819
| ^~~~~~~~~~~~~~~~~~~
18201820
```
18211821

18221822
[Playground](https://rhysd.github.io/actionlint#eJwlyjkOwCAMRNGeU8wFUKSUVLkKICSyyEYZO+fPVv3ifZWE4ewhbFqYAmCN9hY4XRj1Gby4mMcjv/YRrQ3+FxDhbEzI1VYVTrW3uqvbcs03dIgdzQ==)
18231823

18241824
In addition to the checks for inputs of actions described in [the previous section](#check-popular-action-inputs), actionlint
18251825
reports an error when a popular action is 'outdated'. An action is outdated when the runner used by the action is no longer
1826-
supported by GitHub Actions runtime. For example, `node12` is no longer available so any actions can use `node12` runner.
1826+
supported by GitHub Actions runtime. For example, `node12` is no longer available so any actions can not use `node12` runner.
18271827

1828-
Note that this check doesn't report that the action version is up-to-date. For example, even if you use `actions/checkout@v3` and
1829-
newer version `actions/checkout@v4` is available, actionlint reports no error as long as `actions/checkout@v3` is not outdated.
1828+
Note that this check doesn't report that the action version is up-to-date. For example, even if you use `actions/checkout@v4` and
1829+
newer version `actions/checkout@v5` is available, actionlint reports no error as long as `actions/checkout@v4` is not outdated.
18301830
If you want to keep actions used by your workflows up-to-date, consider to use [Dependabot][dependabot-doc].
18311831

18321832
<a name="check-shell-names"></a>

example_your_own_rule_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func ExampleLinter_yourOwnRule() {
5858
//
5959
// testdata/examples/main.yaml:14:9: every step must have its name [step-name]
6060
// |
61-
// 14 | - uses: actions/checkout@v3
61+
// 14 | - uses: actions/checkout@v4
6262
// | ^~~~~
6363
fmt.Println(len(errs), "lint errors found by actionlint")
6464
// Output: 1 lint errors found by actionlint

0 commit comments

Comments
 (0)