Skip to content

Commit cdaed4a

Browse files
committed
Merge branch 'master' into add-csi-support
2 parents e7e095c + d409b79 commit cdaed4a

76 files changed

Lines changed: 4439 additions & 1525 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/md_config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
{
44
"pattern": "^(?!http).+"
55
}
6-
]
6+
],
7+
"retryOn429": true
78
}

.github/workflows/init-branch-release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- name: Checkout code
26-
uses: actions/checkout@v4.2.2
26+
uses: actions/checkout@v5.0.0
2727
with:
2828
fetch-depth: 0
2929
token: ${{ secrets.GITHUB_TOKEN }}
@@ -57,7 +57,7 @@ jobs:
5757
git diff
5858
5959
- name: Create pull request
60-
uses: peter-evans/create-pull-request@v7.0.6
60+
uses: peter-evans/create-pull-request@v7.0.8
6161
with:
6262
commit-message: "Bump version to ${{ inputs.TARGET_VERSION }}"
6363
title: "Bump version to ${{ inputs.TARGET_VERSION }} on ${{ inputs.TARGET_BRANCH }} branch"

.github/workflows/pull_request-helm.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
steps:
2727

2828
- name: Check out code
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@v5
3030
with:
3131
ref: ${{github.event.pull_request.head.sha}}
3232
fetch-depth: 0
@@ -55,7 +55,7 @@ jobs:
5555
steps:
5656

5757
- name: Check out code
58-
uses: actions/checkout@v4
58+
uses: actions/checkout@v5
5959
with:
6060
ref: ${{github.event.pull_request.head.sha}}
6161
fetch-depth: 0

.github/workflows/pull_request.yaml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ env:
2525

2626
jobs:
2727
qa:
28-
uses: stakater/.github/.github/workflows/pull_request_doc_qa.yaml@v0.0.117
28+
uses: stakater/.github/.github/workflows/pull_request_doc_qa.yaml@v0.0.163
2929
with:
3030
MD_CONFIG: .github/md_config.json
3131
DOC_SRC: README.md
@@ -40,7 +40,7 @@ jobs:
4040
name: Build
4141
steps:
4242
- name: Check out code
43-
uses: actions/checkout@v4
43+
uses: actions/checkout@v5
4444
with:
4545
ref: ${{github.event.pull_request.head.sha}}
4646
fetch-depth: 0
@@ -57,12 +57,17 @@ jobs:
5757
charts: deployments/kubernetes/chart/reloader
5858

5959
- name: Set up Go
60-
uses: actions/setup-go@v5
60+
uses: actions/setup-go@v6
6161
with:
6262
go-version-file: 'go.mod'
6363
check-latest: true
6464
cache: true
6565

66+
- name: Create timestamp
67+
id: prep
68+
run: echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
69+
70+
6671
# Get highest tag and remove any suffixes with '-'
6772
- name: Get Highest tag
6873
id: highest_tag
@@ -75,11 +80,7 @@ jobs:
7580
make install
7681
7782
- name: Run golangci-lint
78-
uses: golangci/golangci-lint-action@v5
79-
with:
80-
version: latest
81-
only-new-issues: false
82-
args: --timeout 10m
83+
run: make lint
8384

8485
- name: Helm Lint
8586
run: |
@@ -104,6 +105,7 @@ jobs:
104105
kind create cluster
105106
kubectl cluster-info
106107
108+
107109
- name: Test
108110
run: make test
109111

@@ -135,7 +137,12 @@ jobs:
135137
file: ${{ env.DOCKER_FILE_PATH }}
136138
pull: true
137139
push: false
138-
build-args: BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }}
140+
build-args: |
141+
VERSION=merge-${{ steps.generate_tag.outputs.GIT_TAG }}
142+
COMMIT=${{github.event.pull_request.head.sha}}
143+
BUILD_DATE=${{ steps.prep.outputs.created }}
144+
BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }}
145+
139146
cache-to: type=inline
140147
platforms: linux/amd64,linux/arm,linux/arm64
141148
tags: |

.github/workflows/pull_request_docs.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,22 @@ on:
1212
- 'docs/**'
1313
- 'theme_common'
1414
- 'theme_override'
15+
- 'deployments/kubernetes/chart/reloader/README.md'
1516

1617
jobs:
1718
qa:
18-
uses: stakater/.github/.github/workflows/pull_request_doc_qa.yaml@v0.0.117
19+
uses: stakater/.github/.github/workflows/pull_request_doc_qa.yaml@v0.0.163
1920
with:
2021
MD_CONFIG: .github/md_config.json
2122
DOC_SRC: docs
2223
MD_LINT_CONFIG: .markdownlint.yaml
24+
build:
25+
uses: stakater/.github/.github/workflows/pull_request_container_build.yaml@v0.0.163
26+
with:
27+
DOCKER_FILE_PATH: Dockerfile-docs
28+
CONTAINER_REGISTRY_URL: ghcr.io/stakater
29+
PUSH_IMAGE: false
30+
secrets:
31+
CONTAINER_REGISTRY_USERNAME: ${{ github.actor }}
32+
CONTAINER_REGISTRY_PASSWORD: ${{ secrets.GHCR_TOKEN }}
33+
SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }}

.github/workflows/push-helm-chart.yaml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: Push Helm Chart
22

3+
# TODO: fix: workflows have a problem where only code owners' PRs get the actions running
4+
35
on:
46
pull_request:
57
types:
@@ -9,25 +11,27 @@ on:
911
paths:
1012
- 'deployments/kubernetes/chart/reloader/**'
1113
- '.github/workflows/push-helm-chart.yaml'
14+
- '.github/workflows/release-helm-chart.yaml'
1215

1316
env:
1417
HELM_REGISTRY_URL: "https://stakater.github.io/stakater-charts"
15-
REGISTRY: ghcr.io
18+
REGISTRY: ghcr.io # container registry
1619

1720
jobs:
1821
verify-and-push-helm-chart:
1922

2023
permissions:
2124
contents: read
22-
packages: write # to push artifacts to `ghcr.io`
25+
id-token: write # needed for signing the images with GitHub OIDC Token
26+
packages: write # for pushing and signing container images
2327

2428
name: Verify and Push Helm Chart
2529
if: ${{ (github.event.pull_request.merged == true) && (contains(github.event.pull_request.labels.*.name, 'release/helm-chart')) }}
2630
runs-on: ubuntu-latest
2731

2832
steps:
2933
- name: Check out code
30-
uses: actions/checkout@v4
34+
uses: actions/checkout@v5
3135
with:
3236
token: ${{ secrets.PUBLISH_TOKEN }}
3337
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
@@ -68,6 +72,9 @@ jobs:
6872
echo "Helm Chart Version wasnt updated"
6973
exit 1
7074
75+
- name: Install Cosign
76+
uses: sigstore/cosign-installer@v4.0.0
77+
7178
- name: Login to GHCR Registry
7279
uses: docker/login-action@v3
7380
with:
@@ -81,6 +88,9 @@ jobs:
8188
helm push ./packaged-chart/*.tgz oci://ghcr.io/stakater/charts
8289
rm -rf ./packaged-chart
8390
91+
- name: Sign artifacts with Cosign
92+
run: cosign sign --yes ghcr.io/stakater/charts/reloader:${{ steps.new_chart_version.outputs.result }}
93+
8494
- name: Publish Helm chart to gh-pages
8595
uses: stefanprodan/helm-gh-pages@master
8696
with:
@@ -95,6 +105,13 @@ jobs:
95105
commit_username: stakater-user
96106
commit_email: stakater@gmail.com
97107

108+
- name: Push new chart tag
109+
uses: anothrNick/github-tag-action@1.75.0
110+
env:
111+
GITHUB_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
112+
WITH_V: false
113+
CUSTOM_TAG: chart-v${{ steps.new_chart_version.outputs.result }}
114+
98115
- name: Notify Slack
99116
uses: 8398a7/action-slack@v3
100117
if: always() # Pick up events even if the job fails or is canceled.

.github/workflows/push-pr-image.yaml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ jobs:
3030
if: ${{ github.event.label.name == 'build-and-push-pr-image' }}
3131
steps:
3232
- name: Check out code
33-
uses: actions/checkout@v4
33+
uses: actions/checkout@v5
3434
with:
3535
ref: ${{github.event.pull_request.head.sha}}
3636
fetch-depth: 0
3737

3838
- name: Set up Go
39-
uses: actions/setup-go@v5
39+
uses: actions/setup-go@v6
4040
with:
4141
go-version-file: 'go.mod'
4242
check-latest: true
@@ -47,11 +47,7 @@ jobs:
4747
make install
4848
4949
- name: Run golangci-lint
50-
uses: golangci/golangci-lint-action@v5
51-
with:
52-
version: latest
53-
only-new-issues: false
54-
args: --timeout 10m
50+
run: make lint
5551

5652
- name: Generate Tags
5753
id: generate_tag

.github/workflows/push.yaml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
steps:
3131
- name: Check out code
32-
uses: actions/checkout@v4
32+
uses: actions/checkout@v5
3333
with:
3434
token: ${{ secrets.PUBLISH_TOKEN }}
3535
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
@@ -42,7 +42,7 @@ jobs:
4242
version: v3.11.3
4343

4444
- name: Set up Go
45-
uses: actions/setup-go@v5
45+
uses: actions/setup-go@v6
4646
with:
4747
go-version-file: 'go.mod'
4848
check-latest: true
@@ -53,11 +53,7 @@ jobs:
5353
make install
5454
5555
- name: Run golangci-lint
56-
uses: golangci/golangci-lint-action@v5
57-
with:
58-
version: latest
59-
only-new-issues: false
60-
args: --timeout 10m
56+
run: make lint
6157

6258
- name: Install kubectl
6359
run: |
@@ -91,6 +87,10 @@ jobs:
9187
with:
9288
username: ${{ secrets.STAKATER_DOCKERHUB_USERNAME }}
9389
password: ${{ secrets.STAKATER_DOCKERHUB_PASSWORD }}
90+
91+
- name: Create timestamp
92+
id: prep
93+
run: echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
9494

9595
- name: Generate image repository path for Docker registry
9696
run: |
@@ -148,7 +148,11 @@ jobs:
148148
file: ${{ env.DOCKER_FILE_PATH }}
149149
pull: true
150150
push: true
151-
build-args: BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }}
151+
build-args: |
152+
VERSION=merge-${{ github.event.number }}
153+
COMMIT=${{ github.sha }}
154+
BUILD_DATE=${{ steps.prep.outputs.created }}
155+
BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }}
152156
cache-to: type=inline
153157
platforms: linux/amd64,linux/arm,linux/arm64
154158
tags: |
@@ -200,15 +204,14 @@ jobs:
200204
push: true
201205
build-args: BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }}
202206
cache-to: type=inline
203-
platforms: linux/amd64,linux/arm,linux/arm64
204207
tags: |
205208
${{ env.GHCR_IMAGE_REPOSITORY }}/docs:merge-${{ github.event.number }}
206209
labels: |
207210
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
208211
org.opencontainers.image.revision=${{ github.sha }}
209212
210213
- name: Push Latest Tag
211-
uses: anothrNick/github-tag-action@1.71.0
214+
uses: anothrNick/github-tag-action@1.75.0
212215
env:
213216
GITHUB_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
214217
WITH_V: false
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release Helm chart
2+
3+
on:
4+
push:
5+
tags:
6+
- "chart-v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release-helm-chart:
13+
name: Release Helm chart
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Check out code
18+
uses: actions/checkout@v5
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Create release
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
tag: ${{ github.ref }}
26+
run: |
27+
gh release create "$tag" \
28+
--repo="$GITHUB_REPOSITORY" \
29+
--title="Helm chart ${tag#chart-}" \
30+
--generate-notes
31+
32+
- name: Notify Slack
33+
uses: 8398a7/action-slack@v3
34+
if: always()
35+
with:
36+
status: ${{ job.status }}
37+
fields: repo,author,action,eventName,ref,workflow
38+
env:
39+
SLACK_WEBHOOK_URL: ${{ secrets.STAKATER_DELIVERY_SLACK_WEBHOOK }}

0 commit comments

Comments
 (0)