Skip to content

Commit aef7c54

Browse files
Revert handling of mixed case action identifiers (21836f4)
As motivated by the changes to the specification.
1 parent 6c2504a commit aef7c54

File tree

8 files changed

+15
-51
lines changed

8 files changed

+15
-51
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ Versioning].
1212

1313
## [Unreleased]
1414

15+
### Bug
16+
17+
- Revert handling of mixed case action identifiers.
18+
19+
## [v0.6.2] - 2026-01-04
20+
1521
### Enhancements
1622

1723
- Handle mixed case action identifiers.

SPECIFICATION.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,9 @@ only the workflow at the path declared in the `uses:` value. If multiple
118118
reusable workflow from the same repository are used, each workflow must be
119119
handled.
120120

121-
The resulting is a collection of Action identifiers, `<owner>/<project>@<ref>`,
122-
of which the `<owner>` and `<project>` are normalized to all lowercase (because
123-
GitHub Actions is case insensitive in these). That is, if a project uses
124-
`actions/checkout@v1.2.3` and `Actions/Checkout@v1.2.3` the collection will only
125-
contain `actions/checkout@v1.2.3`.
121+
The resulting is a collection of Action identifiers, `<owner>/<project>@<ref>`.
122+
While GitHub Actions is case-insensitive when resolving `<owner>/<project>`,
123+
these must NOT be normalized (as that would break on case sensitive OSes).
126124

127125
Docker Hub Actions, as seen in the example below, are excluded from the set of
128126
actions the repository depends on (see [#216]).

internal/gha/parse.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func parseUses(uses string) (GitHubAction, error) {
8989
return a, ErrInvalidUsesRepo
9090
}
9191

92-
a.Owner = strings.ToLower(repo[:i])
92+
a.Owner = repo[:i]
9393
project := repo[i+1:]
9494

9595
// split "project" into "project"[/"path"]
@@ -101,6 +101,6 @@ func parseUses(uses string) (GitHubAction, error) {
101101
project = project[:i]
102102
}
103103

104-
a.Project = strings.ToLower(project)
104+
a.Project = project
105105
return a, nil
106106
}

internal/gha/parse_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func TestParseUses(t *testing.T) {
9595
"uppercase in owner": {
9696
uses: "Foo/bar/baz@v42",
9797
want: GitHubAction{
98-
Owner: "foo",
98+
Owner: "Foo",
9999
Project: "bar",
100100
Path: "baz",
101101
Ref: "v42",
@@ -105,7 +105,7 @@ func TestParseUses(t *testing.T) {
105105
uses: "foo/Bar/baz@v42",
106106
want: GitHubAction{
107107
Owner: "foo",
108-
Project: "bar",
108+
Project: "Bar",
109109
Path: "baz",
110110
Ref: "v42",
111111
},
@@ -273,8 +273,8 @@ func TestParseUses(t *testing.T) {
273273
return false
274274
}
275275

276-
return action.Owner == strings.ToLower(owner) &&
277-
action.Project == strings.ToLower(project) &&
276+
return action.Owner == owner &&
277+
action.Project == project &&
278278
action.Path == path &&
279279
action.Ref == ref
280280
}

testdata/init/success.txtar

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,6 @@ jobs:
5050
run: Echo 'hello world!'
5151
example-2:
5252
uses: actions/reusable/.github/workflows/workflow.yml@v2
53-
example-3:
54-
name: example case insensitivity
55-
runs-on: ubuntu-22.04
56-
steps:
57-
- name: Checkout repository
58-
uses: Actions/checkout@main
59-
- name: Install Go
60-
uses: actions/Setup-Go@v5.0.0
61-
with:
62-
go-version-file: go.mod
6353
-- .cache/actions/checkout/main/action.yml --
6454
name: actions/checkout@main
6555
-- .cache/actions/composite/v1/action.yml --

testdata/list/success.txtar

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,6 @@ jobs:
6363
run: Echo 'hello world!'
6464
example-2:
6565
uses: actions/reusable/.github/workflows/workflow.yml@v2
66-
example-3:
67-
name: example case insensitivity
68-
runs-on: ubuntu-22.04
69-
steps:
70-
- name: Checkout repository
71-
uses: Actions/checkout@main
72-
- name: Install Go
73-
uses: actions/Setup-Go@v5.0.0
74-
with:
75-
go-version-file: go.mod
7666
-- .cache/actions/checkout/main/action.yml --
7767
name: actions/checkout@main
7868
-- .cache/actions/composite/v1/action.yml --

testdata/update/success.txtar

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,6 @@ jobs:
103103
run: Echo 'hello world!'
104104
example-2:
105105
uses: actions/reusable/.github/workflows/workflow.yml@v2
106-
example-3:
107-
name: example case insensitivity
108-
runs-on: ubuntu-22.04
109-
steps:
110-
- name: Checkout repository
111-
uses: Actions/checkout@v4.1.1
112-
- name: Install Go
113-
uses: actions/Setup-Go@v5.0.0
114-
with:
115-
go-version-file: go.mod
116106
-- changed/.github/actions/hello-world-action/action.yml --
117107
name: Hello world action
118108
description: Says 'Hello world!'

testdata/verify/success.txtar

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,6 @@ jobs:
8787
run: Echo 'hello world!'
8888
example-2:
8989
uses: actions/reusable/.github/workflows/workflow.yml@v2
90-
example-3:
91-
name: example case insensitivity
92-
runs-on: ubuntu-22.04
93-
steps:
94-
- name: Checkout repository
95-
uses: Actions/checkout@main
96-
- name: Install Go
97-
uses: actions/Setup-Go@v5.0.0
98-
with:
99-
go-version-file: go.mod
10090
-- redundant/.github/actions/hello-world-action/action.yml --
10191
name: Hello world action
10292
description: Says 'Hello world!'

0 commit comments

Comments
 (0)