Skip to content

Commit 79112fa

Browse files
authored
Update workflows (#151)
1 parent 41878fe commit 79112fa

File tree

9 files changed

+78
-34
lines changed

9 files changed

+78
-34
lines changed

.github/dependabot.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
version: 2
22
updates:
3-
- package-ecosystem: "github-actions"
4-
directory: "/"
3+
- package-ecosystem: github-actions
4+
directory: /
55
schedule:
66
interval: daily
7-
reviewers:
8-
- "nginxinc/kic"
9-
- package-ecosystem: "docker"
10-
directory: "/"
7+
8+
- package-ecosystem: docker
9+
directory: /
1110
schedule:
1211
interval: daily
13-
reviewers:
14-
- "nginxinc/kic"

.github/labeler.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
change:
2+
- head-branch: ['^change/']
3+
14
enhancement:
25
- head-branch: ['^feature/', '^feat/', '^enhancement/', '^enh/']
36

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,4 +160,4 @@ jobs:
160160
architecture=("${arch#*/}")
161161
./preflight check container quay.io/nginx/nginx-ingress-operator:${{ steps.meta.outputs.version }} --pyxis-api-token ${{ secrets.PYXIS_API_TOKEN }} --certification-project-id ${{ secrets.CERTIFICATION_PROJECT_ID }} --platform $architecture --submit
162162
done
163-
if: ${{ startsWith(github.ref, 'refs/tags') }}
163+
if: ${{ github.ref_type == 'tag' }}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Dependency Review"
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
7+
concurrency:
8+
group: ${{ github.ref_name }}-deps-review
9+
cancel-in-progress: true
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
dependency-review:
16+
runs-on: ubuntu-22.04
17+
permissions:
18+
contents: read # for actions/checkout
19+
pull-requests: write # for actions/dependency-review-action to post comments
20+
steps:
21+
- name: "Checkout Repository"
22+
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
23+
24+
- name: "Dependency Review"
25+
uses: actions/dependency-review-action@1360a344ccb0ab6e9475edef90ad2f46bf8003b1 # v3.0.6
26+
with:
27+
config-file: "nginxinc/k8s-common/dependency-review-config.yml@main"

.github/workflows/labeler.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "Pull Request Labeler"
22
on:
3-
- pull_request_target
3+
- pull_request_target
44

55
permissions:
66
contents: read
@@ -9,10 +9,10 @@ jobs:
99
triage:
1010
permissions:
1111
contents: read
12-
pull-requests: write
13-
runs-on: ubuntu-latest
12+
pull-requests: write # for actions/labeler to add labels
13+
runs-on: ubuntu-22.04
1414
steps:
15-
- uses: joshdales/labeler@3352df1f2b0ef052cea774a5eaff917ea700a1b4 # if https://github.com/actions/labeler/pull/203 is merged, use the official action actions/labeler
16-
with:
17-
repo-token: "${{ secrets.GITHUB_TOKEN }}"
18-
sync-labels: true
15+
- uses: actions/labeler@4f052778de9a9b80cb16cfb9079b02287285a4cb # v5.0.0-alpha.1
16+
with:
17+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
18+
sync-labels: true

.github/workflows/notifications.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ jobs:
1616
on-failure:
1717
runs-on: ubuntu-22.04
1818
if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.repository.fork == false }}
19+
permissions:
20+
contents: read
21+
actions: read # for 8398a7/action-slack
1922
steps:
2023
- name: Data
2124
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1

.github/workflows/scorecard.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,26 @@ on:
66
# To guarantee Maintained check is occasionally updated. See
77
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
88
schedule:
9-
- cron: '33 10 * * 1'
9+
- cron: "33 10 * * 1" # run every Monday at 10:33 UTC
1010
push:
11-
branches: [ "main" ]
11+
branches:
12+
- main
1213

1314
# Declare default permissions as read only.
1415
permissions: read-all
1516

1617
jobs:
1718
analysis:
1819
name: Scorecard analysis
19-
runs-on: ubuntu-latest
20+
runs-on: ubuntu-22.04
2021
permissions:
2122
# Needed to upload the results to code-scanning dashboard.
2223
security-events: write
2324
# Needed to publish results and get a badge (see publish_results below).
2425
id-token: write
26+
# Uncomment the permissions below if installing in a private repository.
27+
# contents: read
28+
# actions: read
2529

2630
steps:
2731
- name: "Checkout code"
@@ -34,11 +38,15 @@ jobs:
3438
with:
3539
results_file: results.sarif
3640
results_format: sarif
37-
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
38-
# - you want to enable the Branch-Protection check on a *public* repository, or
39-
# - you are installing Scorecard on a *private* repository
40-
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
4141
repo_token: ${{ secrets.SCORECARD_TOKEN }}
42+
43+
# Public repositories:
44+
# - Publish results to OpenSSF REST API for easy access by consumers
45+
# - Allows the repository to include the Scorecard badge.
46+
# - See https://github.com/ossf/scorecard-action#publishing-results.
47+
# For private repositories:
48+
# - `publish_results` will always be set to `false`, regardless
49+
# of the value entered here.
4250
publish_results: true
4351

4452
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF

.github/workflows/stale.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
name: 'Close stale issues and PRs'
1+
name: "Close stale issues and PRs"
22
on:
33
schedule:
4-
- cron: '30 1 * * *'
4+
- cron: "30 1 * * *" # run at 1:30am every day
55

66
permissions:
77
contents: read
88

99
jobs:
1010
stale:
1111
permissions:
12-
issues: write # for actions/stale to close stale issues
13-
pull-requests: write # for actions/stale to close stale PRs
12+
issues: write # for actions/stale to close stale issues
13+
pull-requests: write # for actions/stale to close stale PRs
1414
runs-on: ubuntu-22.04
1515
steps:
1616
- uses: actions/stale@1160a2240286f5da8ec72b1c0816ce2481aabf84 # v8.0.0
1717
with:
1818
repo-token: ${{ secrets.GITHUB_TOKEN }}
19-
stale-issue-message: 'This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
20-
stale-pr-message: 'This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
21-
close-issue-message: 'This issue was closed because it has been stalled for 10 days with no activity.'
22-
close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.'
23-
stale-issue-label: 'stale'
24-
stale-pr-label: 'stale'
19+
stale-issue-message: "This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 10 days."
20+
stale-pr-message: "This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 10 days."
21+
close-issue-message: "This issue was closed because it has been stalled for 10 days with no activity."
22+
close-pr-message: "This PR was closed because it has been stalled for 10 days with no activity."
23+
stale-issue-label: "stale"
24+
stale-pr-label: "stale"
2525
exempt-all-assignees: true
26-
exempt-issue-labels: 'proposal'
26+
exempt-issue-labels: "proposal"
2727
operations-per-run: 100
2828
days-before-stale: 90
2929
days-before-close: 10

.github/workflows/sync-chart.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,15 @@ on:
88
required: true
99
default: "0.0.0"
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
sync:
1316
runs-on: ubuntu-22.04
17+
permissions:
18+
contents: write
19+
pull-requests: write
1420
steps:
1521
- name: Checkout
1622
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3

0 commit comments

Comments
 (0)