@@ -13,15 +13,15 @@ The `upgrade` section controls how actions are upgraded.
1313
1414``` yaml
1515upgrade :
16- version : tag
16+ format : tag
1717 actions :
1818 actions/checkout :
19- version : ^1.0.0
19+ constraint : ^1.0.0
2020 actions/setup-go :
21- version : ~1.0.0
21+ constraint : ~1.0.0
2222` ` `
2323
24- ### version
24+ ### format
2525
2626Controls the format of action references after upgrade.
2727
@@ -33,19 +33,19 @@ Controls the format of action references after upgrade.
3333
3434# ## actions
3535
36- Per-action version patterns controlling which versions are allowed.
36+ Per-action version constraints controlling which versions are allowed.
3737
38- # # Version Patterns
38+ # # Version Constraints
3939
4040# ## Caret (`^`) - Allow Minor Updates
4141
4242` ` ` yaml
4343actions:
4444 actions/checkout:
45- version : ^1.0.0 # Allows 1.x.x but not 2.x.x
45+ constraint : ^1.0.0 # Allows 1.x.x but not 2.x.x
4646` ` `
4747
48- | Pattern | Allowed | Not Allowed |
48+ | Constraint | Allowed | Not Allowed |
4949|---------|---------|-------------|
5050| `^1.0.0` | `1.0.1`, `1.2.0`, `1.99.0` | `2.0.0` |
5151| `^2.0.0` | `2.0.1`, `2.5.0` | `3.0.0` |
@@ -58,10 +58,10 @@ actions:
5858` ` ` yaml
5959actions:
6060 actions/checkout:
61- version : ~1.2.0 # Allows 1.2.x but not 1.3.x
61+ constraint : ~1.2.0 # Allows 1.2.x but not 1.3.x
6262` ` `
6363
64- | Pattern | Allowed | Not Allowed |
64+ | Constraint | Allowed | Not Allowed |
6565|---------|---------|-------------|
6666| `~1.2.0` | `1.2.1`, `1.2.5` | `1.3.0`, `2.0.0` |
6767| `~2.5.0` | `2.5.1`, `2.5.99` | `2.6.0` |
@@ -78,12 +78,12 @@ Only allow patch updates for stability:
7878
7979` ` ` yaml
8080upgrade:
81- version : tag
81+ format : tag
8282 actions:
8383 actions/checkout:
84- version : ~4.0.0
84+ constraint : ~4.0.0
8585 actions/setup-go:
86- version : ~5.0.0
86+ constraint : ~5.0.0
8787` ` `
8888
8989# ## Major Version Pinning
@@ -92,10 +92,10 @@ Use major version tags for cleaner workflow files:
9292
9393` ` ` yaml
9494upgrade:
95- version : major
95+ format : major
9696 actions:
9797 actions/checkout:
98- version : ^1.0.0
98+ constraint : ^1.0.0
9999` ` `
100100
101101Result :
@@ -109,10 +109,10 @@ Pin to exact commits for maximum security:
109109
110110` ` ` yaml
111111upgrade:
112- version : hash
112+ format : hash
113113 actions:
114114 actions/checkout:
115- version : ^1.0.0
115+ constraint : ^1.0.0
116116` ` `
117117
118118Result :
@@ -122,32 +122,32 @@ Result:
122122
123123# ## Mixed Strategies
124124
125- Different patterns for different actions :
125+ Different constraints for different actions :
126126
127127` ` ` yaml
128128upgrade:
129- version : tag
129+ format : tag
130130 actions:
131131 # Critical actions - patch updates only
132132 actions/checkout:
133- version : ~4.0.0
133+ constraint : ~4.0.0
134134
135135 # Less critical - minor updates allowed
136136 actions/cache:
137- version : ^4.0.0
137+ constraint : ^4.0.0
138138
139139 # Third-party - more conservative
140140 docker/build-push-action:
141- version : ~5.0.0
141+ constraint : ~5.0.0
142142` ` `
143143
144144# # Upgrade Process
145145
1461461. **Discover** : Scan workflows for action usages
1471472. **Resolve** : Get current version (resolve hash to tag if needed)
1481483. **Fetch** : Get latest version from GitHub API
149- 4. **Compare** : Check if update matches version pattern
150- 5. **Update** : Apply update based on `version` format setting
149+ 4. **Compare** : Check if update matches version constraint
150+ 5. **Update** : Apply update based on `format` setting
151151
152152# # See Also
153153
0 commit comments