Skip to content

Commit bc4276a

Browse files
fix: remove pull target (#2107)
Signed-off-by: matttrach <matt.trachier@suse.com> Co-authored-by: Matt Trachier <matt.trachier@suse.com>
1 parent 0e128b4 commit bc4276a

23 files changed

Lines changed: 382 additions & 176 deletions

.github/pull_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!--- If there is no user issue related to this then you should remove the next line --->
22
Addresses #
33

4-
<!--- Add labels (eg. release/v13) for each release branch to target --->
5-
<!--- Labels need to be added before PR is created for automation to run smoothly! --->
4+
<!--- Add labels (eg. release/v14) for each release branch to target --->
5+
<!--- Please don't manually add "internal" labels, those are for automation only --->
66

77
## Description
88

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Backport Merge Label
2+
3+
on:
4+
pull_request:
5+
types: [closed]
6+
branches:
7+
- 'release/*'
8+
9+
jobs:
10+
label:
11+
if: ${{ github.event.pull_request.merged == true }}
12+
permissions:
13+
contents: read
14+
issues: write
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: 'Checkout Repository'
18+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
19+
with:
20+
fetch-depth: 0
21+
ref: 'main'
22+
- name: 'Find and Label Related Issue'
23+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 https://github.com/actions/github-script
24+
with:
25+
script: |
26+
const scriptPath = `${process.env.GITHUB_WORKSPACE}/.github/workflows/scripts/merge-label.js`;
27+
const { default: script } = await import(scriptPath);
28+
await script({github, context, core});

.github/workflows/backport-pr-manual.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ jobs:
4343
core.setFailed(`Failed to retrieve PRs associated with commit ${mergeCommitSha}: ${error.message}`);
4444
}
4545
- name: 'Checkout Repository'
46-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
46+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
4747
with:
4848
fetch-depth: 0
49+
ref: 'main'
4950
- name: 'Find Issues and Create Cherry-Pick PRs'
5051
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 https://github.com/actions/github-script
5152
env:

.github/workflows/backport-prs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ jobs:
4343
// set output for next steps
4444
core.setOutput('merge_commit_sha', mergeCommitSha);
4545
- name: 'Checkout Repository'
46-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
46+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
4747
with:
4848
fetch-depth: 0
49+
ref: 'main'
4950
- name: 'Find Issues and Create Cherry-Pick PRs'
5051
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 https://github.com/actions/github-script
5152
env:

.github/workflows/fossa.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: FOSSA Scanning
22

33
on:
44
push:
5-
branches: ["main", "master", "release/**"]
5+
branches: ["main", "release/**"]
66
workflow_dispatch:
77

88
permissions:
@@ -14,21 +14,20 @@ jobs:
1414
runs-on: ubuntu-latest
1515
timeout-minutes: 30
1616
steps:
17-
- name: Checkout
18-
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
17+
- name: Checkout
18+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
1919

20-
# The FOSSA token is shared between all repos in Rancher's GH org. It can be
21-
# used directly and there is no need to request specific access to EIO.
22-
- name: Read FOSSA token
23-
uses: rancher-eio/read-vault-secrets@main
24-
with:
25-
secrets: |
26-
secret/data/github/org/rancher/fossa/push token | FOSSA_API_KEY_PUSH_ONLY
20+
# The FOSSA token is shared between all repos in Rancher's GH org. It can be
21+
# used directly and there is no need to request specific access to EIO.
22+
- name: Read FOSSA token
23+
uses: rancher-eio/read-vault-secrets@main
24+
with:
25+
secrets: |
26+
secret/data/github/org/rancher/fossa/push token | FOSSA_API_KEY_PUSH_ONLY
2727
28-
- name: FOSSA scan
29-
uses: fossas/fossa-action@main
30-
with:
31-
api-key: ${{ env.FOSSA_API_KEY_PUSH_ONLY }}
32-
# Only runs the scan and do not provide/returns any results back to the
33-
# pipeline.
34-
run-tests: false
28+
- name: FOSSA scan
29+
uses: fossas/fossa-action@main
30+
with:
31+
api-key: ${{ env.FOSSA_API_KEY_PUSH_ONLY }}
32+
# Only run the scan and don't provide/return any results back to the pipeline.
33+
run-tests: false

.github/workflows/manual-rc-release.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
echo "Tag doesn't contain 'rc', please use the manual-release workflow"
4141
exit 1
4242
fi
43-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
43+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
4444
with:
4545
fetch-depth: 0
4646
- name: Create and Push RC Tag with Git
@@ -58,7 +58,7 @@ jobs:
5858
fi
5959
git push origin "$TAG"
6060
- name: Check out new tag into a new directory
61-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
61+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
6262
with:
6363
ref: ${{ inputs.tag }}
6464
path: ${{ github.workspace }}/tags/${{ inputs.tag }}
@@ -108,7 +108,7 @@ jobs:
108108
109109
echo "Importing gpg key"
110110
echo "${GPG_KEY}" | gpg --import --batch > /dev/null || { echo "Failed to import GPG key"; exit 1; }
111-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 https://github.com/actions/setup-go
111+
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 https://github.com/actions/setup-go
112112
with:
113113
go-version-file: ${{ github.workspace }}/tags/${{ inputs.tag }}/go.mod
114114
cache-dependency-path: ${{ github.workspace }}/tags/${{ inputs.tag }}/go.sum
@@ -127,10 +127,8 @@ jobs:
127127
env:
128128
TAG: ${{ inputs.tag }}
129129
BRANCH: ${{ inputs.branch }}
130-
OWNER: ${{ github.repository_owner }}
131-
REPO: ${{ github.event.repository.name }}
132130
with:
133131
script: |
134132
const scriptPath = `${{ github.workspace }}/.github/workflows/scripts/rc-notify.js`;
135133
const { default: script } = await import(scriptPath);
136-
await script({github, process});
134+
await script({github, context, core, process});

.github/workflows/manual-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
echo "Tag contains 'rc', please use the manual-rc-release workflow"
3434
exit 1
3535
fi
36-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
36+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
3737
with:
3838
fetch-depth: 0
3939
- name: Create and Push Tag with Git
@@ -51,7 +51,7 @@ jobs:
5151
fi
5252
git push origin "$TAG"
5353
- name: Check out new tag into a new directory
54-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
54+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
5555
with:
5656
ref: ${{ inputs.tag }}
5757
path: ${{ github.workspace }}/tags/${{ inputs.tag }}
@@ -101,7 +101,7 @@ jobs:
101101
102102
echo "Importing gpg key"
103103
echo "${GPG_KEY}" | gpg --import --batch > /dev/null || { echo "Failed to import GPG key"; exit 1; }
104-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 https://github.com/actions/setup-go
104+
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 https://github.com/actions/setup-go
105105
with:
106106
go-version-file: ${{ github.workspace }}/tags/${{ inputs.tag }}/go.mod
107107
cache-dependency-path: ${{ github.workspace }}/tags/${{ inputs.tag }}/go.sum

.github/workflows/pull_request.yaml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
14+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
1515
- name: build binaries
1616
env:
1717
CROSS: 1
@@ -21,7 +21,7 @@ jobs:
2121
test:
2222
runs-on: ubuntu-latest
2323
steps:
24-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
24+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
2525
with:
2626
fetch-depth: 0
2727
- name: install-nix
@@ -38,7 +38,7 @@ jobs:
3838
name: 'Terraform'
3939
runs-on: ubuntu-latest
4040
steps:
41-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
41+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
4242
with:
4343
fetch-depth: 0
4444
- name: install-nix
@@ -57,7 +57,7 @@ jobs:
5757
name: 'Lint Workflows'
5858
runs-on: ubuntu-latest
5959
steps:
60-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
60+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
6161
with:
6262
fetch-depth: 0
6363
- name: install-nix
@@ -74,7 +74,7 @@ jobs:
7474
name: 'Node Check'
7575
runs-on: ubuntu-latest
7676
steps:
77-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
77+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
7878
with:
7979
fetch-depth: 0
8080
- name: install-nix
@@ -95,7 +95,7 @@ jobs:
9595
name: 'ESLint'
9696
runs-on: ubuntu-latest
9797
steps:
98-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
98+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
9999
with:
100100
fetch-depth: 0
101101
- name: install-nix
@@ -113,7 +113,7 @@ jobs:
113113
shellcheck:
114114
runs-on: ubuntu-latest
115115
steps:
116-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
116+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
117117
with:
118118
fetch-depth: 0
119119
- name: install-nix
@@ -133,9 +133,9 @@ jobs:
133133
validate-commit-message:
134134
runs-on: ubuntu-latest
135135
steps:
136-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
136+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
137137
with:
138-
fetch-depth: 0 # fetch all history so that we can validate the commit messages
138+
fetch-depth: 0
139139
- name: install-nix
140140
run: |
141141
curl -L https://nixos.org/nix/install | sh
@@ -160,7 +160,7 @@ jobs:
160160
cat <<EOF
161161
...Commit message does not start with the required prefix.
162162
Please use one of the following prefixes: "fix:", "feature:", "feat:", "refactor!:", "feature!:", or "feat!:".
163-
This enables release-please to automatically determine the type of release (major, minor, patch) based on the commit message.
163+
This enables release-please to automatically format release notes based on the commit message.
164164
$message
165165
EOF
166166
exit 1
@@ -180,11 +180,11 @@ jobs:
180180
length_check() {
181181
message="$1"
182182
length="$(wc -m <<<"$message")"
183-
if [ $length -gt 50 ]; then
184-
echo "...Commit message subject line should be less than 50 characters, found $length."
183+
if [ $length -gt 100 ]; then
184+
echo "...Commit message subject line should be less than 100 characters, found $length."
185185
exit 1
186186
else
187-
echo "...Commit message subject line is less than 50 characters."
187+
echo "...Commit message subject line is less than 100 characters."
188188
fi
189189
}
190190
spell_check() {
@@ -193,6 +193,7 @@ jobs:
193193
if [ "" != "$WORDS" ]; then
194194
echo "...Commit message contains spelling errors on: ^$WORDS\$"
195195
echo "...Also try updating the PR title."
196+
echo "...If this is a mistake, add your word to the aspell_custom.txt file, it is case insensitive."
196197
exit 1
197198
else
198199
echo "...Commit message doesnt contain spelling errors."
@@ -218,7 +219,7 @@ jobs:
218219
name: 'Scan for Secrets'
219220
runs-on: ubuntu-latest
220221
steps:
221-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
222+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
222223
with:
223224
fetch-depth: 0
224225
- name: install-nix

.github/workflows/rc-notifications.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: 'Checkout Repository'
15-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
15+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
1616
with:
1717
fetch-depth: 0
18+
ref: 'main'
1819
- name: 'Find Issues and Create Comments'
1920
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 https://github.com/actions/github-script
2021
with:
2122
script: |
2223
const scriptPath = `${process.env.GITHUB_WORKSPACE}/.github/workflows/scripts/rc-notify.js`;
2324
const { default: script } = await import(scriptPath);
24-
await script({github, context});
25+
await script({github, context, core, process});

.github/workflows/release.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
release_pr: ${{ steps.release-please.outputs.pr }}
3636
release_version: ${{ steps.release-please.outputs.version }}
3737
steps:
38-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
38+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
3939
with:
4040
fetch-depth: 0
4141
- uses: googleapis/release-please-action@c2a5a2bd6a758a0937f1ddb1e8950609867ed15c # v4.3.0 https://github.com/googleapis/release-please-action/commits/main/
@@ -82,7 +82,7 @@ jobs:
8282
attempts: [1,2,3] # I want to have jobs specifically in place to retry or cancel a test based on IP collisions
8383
test_name: ${{ fromJSON(needs.setup.outputs.tests) }}
8484
steps:
85-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
85+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
8686
with:
8787
fetch-depth: 0
8888
- name: 'Clear out GitHub Runner'
@@ -155,7 +155,7 @@ jobs:
155155
name: lock-${{ matrix.test_name }}-${{ strategy.job-index }}
156156
path: /dev/null
157157
retention-days: 1
158-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 https://github.com/actions/setup-go
158+
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 https://github.com/actions/setup-go
159159
if: (steps.check-lock.outputs.status == 'clean' && steps.check-ip.outputs.status == 'clean') || strategy.job-index == 0
160160
with:
161161
go-version-file: 'go.mod'
@@ -206,7 +206,7 @@ jobs:
206206
if: always() && needs.release.outputs.release_pr
207207
runs-on: ubuntu-latest
208208
steps:
209-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
209+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
210210
with:
211211
token: ${{secrets.GITHUB_TOKEN}}
212212
fetch-depth: 0
@@ -233,7 +233,7 @@ jobs:
233233
if: always() && needs.release.outputs.release_pr
234234
runs-on: ubuntu-latest
235235
steps:
236-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
236+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
237237
with:
238238
token: ${{secrets.GITHUB_TOKEN}}
239239
fetch-depth: 0
@@ -326,7 +326,7 @@ jobs:
326326
steps:
327327
# If the e2e tests pass we automatically generate an RC release
328328
# this shouldn't happen when the release PR is merged, only when it's opened or updated
329-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
329+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
330330
with:
331331
fetch-depth: 0
332332
- name: Create and Push RC Tag with Git
@@ -407,13 +407,11 @@ jobs:
407407
env:
408408
TAG: ${{ env.RC_TAG }}
409409
BRANCH: ${{ env.RC_BRANCH }}
410-
OWNER: ${{ github.repository_owner }}
411-
REPO: ${{ github.event.repository.name }}
412410
with:
413411
script: |
414412
const scriptPath = `${{ github.workspace }}/.github/workflows/scripts/rc-notify.js`;
415413
const { default: script } = await import(scriptPath);
416-
await script({github, process});
414+
await script({github, context, core, process});
417415
418416
# This runs after release-please generates a release, so when the release PR is merged
419417
publish:
@@ -428,10 +426,10 @@ jobs:
428426
if: always() && needs.release.outputs.release_version
429427
runs-on: ubuntu-latest
430428
steps:
431-
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 https://github.com/actions/checkout
429+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 https://github.com/actions/checkout
432430
with:
433431
fetch-depth: 0
434-
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 https://github.com/actions/setup-go
432+
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 https://github.com/actions/setup-go
435433
with:
436434
go-version-file: 'go.mod'
437435
cache: true

0 commit comments

Comments
 (0)