Skip to content

Commit cc7ec68

Browse files
committed
workflows: update all workflow versions
1 parent 6b27edb commit cc7ec68

File tree

3 files changed

+89
-56
lines changed

3 files changed

+89
-56
lines changed

.github/workflows/docs.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ jobs:
1616
run:
1717
working-directory: docs
1818
steps:
19-
- uses: actions/checkout@v4
19+
- name: Checkout code
20+
uses: actions/checkout@v6
2021

21-
- uses: actions/setup-node@v4
22-
with:
23-
node-version: 22
24-
- run: |
25-
npm i --legacy-peer-deps
26-
npm run build
27-
npm run export
28-
29-
- uses: peaceiris/actions-gh-pages@v4
30-
with:
31-
github_token: ${{ secrets.GITHUB_TOKEN }}
32-
publish_dir: ./docs/out
33-
keep_files: true
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: 22
25+
- run: |
26+
npm i --legacy-peer-deps
27+
npm run build
28+
npm run export
3429
30+
- uses: peaceiris/actions-gh-pages@v4
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
publish_dir: ./docs/out
34+
keep_files: true

.github/workflows/main.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,21 @@ on:
1313
jobs:
1414
test:
1515
runs-on: ubuntu-latest
16+
1617
steps:
17-
- uses: actions/checkout@v4
18+
- name: Checkout code
19+
uses: actions/checkout@v6
1820

19-
- uses: actions/setup-go@v5
21+
- name: Set up Go
22+
uses: actions/setup-go@v6
2023
with:
21-
go-version-file: 'go.mod'
24+
go-version-file: go.mod
25+
cache: true
2226

23-
- uses: golangci/golangci-lint-action@v7
27+
- name: Run golangci-lint
28+
uses: golangci/golangci-lint-action@v9
2429
with:
25-
version: v2.1.6
30+
version: latest
2631
args: --timeout=5m
2732

2833
- run: make test

.github/workflows/release.yml

Lines changed: 65 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,50 +5,78 @@ on:
55
tags:
66
- 'v*'
77

8+
permissions:
9+
contents: write
10+
packages: write
11+
12+
env:
13+
CHART_REPOSITORY: ghcr.io/${{ github.repository_owner }}/charts
14+
815
jobs:
916
test:
1017
uses: ./.github/workflows/main.yml
1118

1219
release:
1320
runs-on: ubuntu-latest
14-
needs: [ test ]
21+
needs: [test]
1522
permissions:
1623
packages: write
1724
contents: write
1825
steps:
19-
- uses: actions/checkout@v4
20-
21-
- run: |
22-
git config user.name "$GITHUB_ACTOR"
23-
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
24-
25-
- run: |
26-
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
27-
28-
- uses: actions/setup-go@v5
29-
with:
30-
go-version-file: 'go.mod'
31-
32-
- uses: docker/login-action@v3
33-
with:
34-
registry: ghcr.io
35-
username: ${{ github.actor }}
36-
password: ${{ secrets.GITHUB_TOKEN }}
37-
38-
- uses: goreleaser/goreleaser-action@v3
39-
env:
40-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41-
with:
42-
version: latest
43-
args: release
44-
if: success()
45-
46-
- run: |
47-
go run cmd/updater/updater.go --file charts/octopinger/Chart.yaml --version ${{ env.RELEASE_VERSION }}
48-
49-
- uses: helm/chart-releaser-action@v1.7.0
50-
env:
51-
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
52-
with:
53-
charts_dir: charts
54-
config: ${{ github.workspace }}/.cr.yaml
26+
- name: Checkout code
27+
uses: actions/checkout@v6
28+
29+
- name: Set up Go
30+
uses: actions/setup-go@v6
31+
with:
32+
go-version-file: go.mod
33+
cache: true
34+
35+
- name: Run golangci-lint
36+
uses: golangci/golangci-lint-action@v9
37+
with:
38+
version: latest
39+
40+
- run: |
41+
git config user.name "$GITHUB_ACTOR"
42+
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
43+
44+
- run: |
45+
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> "$GITHUB_ENV"
46+
47+
- uses: docker/login-action@v3
48+
with:
49+
registry: ghcr.io
50+
username: ${{ github.actor }}
51+
password: ${{ secrets.GITHUB_TOKEN }}
52+
53+
- uses: goreleaser/goreleaser-action@v6
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
with:
57+
version: latest
58+
args: release
59+
if: success()
60+
61+
- run: |
62+
go run cmd/updater/updater.go \
63+
--file charts/octopinger/Chart.yaml \
64+
--version "${{ env.RELEASE_VERSION }}"
65+
66+
- uses: helm/chart-releaser-action@v1.7.0
67+
env:
68+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
69+
with:
70+
charts_dir: charts
71+
config: ${{ github.workspace }}/.cr.yaml
72+
73+
- name: Package chart
74+
run: |
75+
PACKAGE=$(helm package charts/octopinger -u | cut -d " " -f 8)
76+
echo "PACKAGE=${PACKAGE}" >> "${GITHUB_ENV}"
77+
78+
- name: Push chart to OCI registry
79+
run: |
80+
helm push \
81+
"${{ env.PACKAGE }}" \
82+
"oci://${{ env.CHART_REPOSITORY }}"

0 commit comments

Comments
 (0)