File tree 5 files changed +34
-3
lines changed
.github/workflows/scripts
5 files changed +34
-3
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ set -euo pipefail
22
22
23
23
# Verify the tag has semver format.
24
24
cd __EXAMPLE_PACKAGE__
25
+
25
26
# shellcheck source=/dev/null
26
27
source " ./.github/workflows/scripts/e2e-utils.sh"
27
28
major=$( version_major " $RELEASE_TAG " )
@@ -81,6 +82,19 @@ if [[ "$results" != "" ]]; then
81
82
exit 1
82
83
fi
83
84
85
+ # Verify the Maven Actions use the correct builder ref.
86
+ results=$(
87
+ find actions/maven/ internal/builders/maven/ -name ' *.yaml' -o -name ' *.yml' -type f -print0 |
88
+ xargs -0 grep -Pn " ref:(\s*(?!$RELEASE_TAG )[^\s]+)" ||
89
+ true
90
+ )
91
+ if [[ " $results " != " " ]]; then
92
+ echo " Some Maven Actions are referencing the builder at the incorrect tag \" $RELEASE_TAG \" "
93
+ echo " $results "
94
+ exit 1
95
+ fi
96
+
97
+
84
98
if [[ " $RELEASE_TAG " =~ .* -rc\. [0-9]* $ ]]; then
85
99
# don't check documentation for release candidates
86
100
exit 0
Original file line number Diff line number Diff line change 36
36
37
37
# Verify our Actions are referenced at main in internal actions.
38
38
results=$(
39
- find .github/actions/ -maxdepth 2 -name ' *.yaml' -o -name ' *.yml' -type f -print0 \
39
+ find .github/actions/ -maxdepth 2 -name ' *.yaml' -o -name ' *.yml' -type f -print0 |
40
40
xargs -0 grep -P " slsa-framework/slsa-github-generator/.*@(?!main)" ||
41
41
true
42
42
)
@@ -57,3 +57,17 @@ if [[ "$results" != "" ]]; then
57
57
echo " $results "
58
58
exit 1
59
59
fi
60
+
61
+ # Verify the Maven Actions use the correct builder ref.
62
+ results=$(
63
+ find actions/maven/ internal/builders/maven/ -name ' *.yaml' -o -name ' *.yml' -type f -print0 |
64
+ xargs -0 grep -Pn " ref:(\s*(?!main)[^\s]+)" ||
65
+ true
66
+ )
67
+ if [[ " $results " != " " ]]; then
68
+ echo " Some Maven Actions are not referencing the builder at main"
69
+ echo " $results "
70
+ exit 1
71
+ fi
72
+
73
+
Original file line number Diff line number Diff line change @@ -475,6 +475,7 @@ Update version references with the following command:
475
475
476
476
` ` ` shell
477
477
find .github/workflows/ .github/actions/ actions/ -name '*.yaml' -o -name '*.yml' | xargs sed -i "s/uses: slsa-framework\/ slsa-github-generator\/ \( .*\) @\( main\| v[0-9]\+\. [0-9]\+\. [0-9]\+\( -rc\. [0-9]\+\)\?\) /uses: slsa-framework\/ slsa-github-generator\/ \1 @$BUILDER_TAG/"
478
+ find actions/maven/ internal/builders/maven/ -name '*.yaml' -o -name '*.yml' -type f | xargs sed -i "s/\( ref:[ ]*\) main/\1 $BUILDER_TAG/"
478
479
` ` `
479
480
480
481
Likewise, update documentation with the following command :
@@ -504,6 +505,8 @@ Send a PR to reference the Actions at `@main`. You can use:
504
505
505
506
` ` ` shell
506
507
find .github/workflows/ .github/actions/ actions/ -name '*.yaml' -o -name '*.yml' | xargs sed -i "s/uses: slsa-framework\/ slsa-github-generator\/ \( .*\) @${BUILDER_TAG}/uses: slsa-framework\/ slsa-github-generator\/ \1 @main/"
508
+ find actions/maven/ internal/builders/maven/ -name '*.yaml' -o -name '*.yml' -type f | xargs sed -i "s/\( ref:[ ]*\) $BUILDER_TAG/\1 main/"
509
+
507
510
` ` `
508
511
509
512
# ## Update verifier
Original file line number Diff line number Diff line change 76
76
uses : slsa-framework/slsa-github-generator/.github/actions/secure-builder-checkout@main
77
77
with :
78
78
repository : slsa-framework/slsa-github-generator
79
- ref : v1.8.0
79
+ ref : main
80
80
path : __BUILDER_CHECKOUT_DIR__
81
81
82
82
- name : Publish to the Maven Central Repository
Original file line number Diff line number Diff line change 62
62
uses : slsa-framework/slsa-github-generator/.github/actions/secure-builder-checkout@main
63
63
with :
64
64
repository : slsa-framework/slsa-github-generator
65
- ref : v1.8.0
65
+ ref : main
66
66
path : __BUILDER_CHECKOUT_DIR__
67
67
- name : Run mvn package
68
68
shell : bash
You can’t perform that action at this time.
0 commit comments