Skip to content

Commit d0baa5d

Browse files
ci: update lint action
1 parent 131a906 commit d0baa5d

File tree

10 files changed

+61
-52
lines changed

10 files changed

+61
-52
lines changed

.devcontainer/docker-compose.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ services:
4444
depends_on:
4545
- passenger-app
4646
passenger-app:
47-
image: ghcr.io/rakutentech/passenger-go-exporter/passenger-app:6.0.14
47+
image: ghcr.io/rakutentech/passenger-go-exporter/passenger-app:6.0.20
48+
platform: linux/x86_64
4849
ports:
4950
- 3000:3000
5051
environment:

.github/workflows/e2e.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
- 6.0.20
1919
steps:
2020
- uses: actions/checkout@v4
21-
- uses: engineerd/setup-kind@v0.5.0
21+
- uses: helm/kind-action@v1.5.0
2222
with:
23-
version: "v0.21.0"
23+
cluster_name: kind
2424
- name: Kind Load Image
2525
run: |
2626
docker build -t passenger-go-exporter:test .

.github/workflows/pull-request.yml

+11-7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
pull_request:
55
types: [opened, synchronize, reopened]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
test:
912
name: Test
@@ -13,9 +16,12 @@ jobs:
1316
- uses: actions/setup-go@v5
1417
with:
1518
go-version: '1.20'
19+
cache: false
1620
- uses: actions/cache@v4
1721
with:
18-
path: ~/go/pkg/mod
22+
path: |
23+
~/.cache/go-build
24+
~/go/pkg/mod
1925
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
2026
restore-keys: |
2127
${{ runner.os }}-go-
@@ -28,7 +34,7 @@ jobs:
2834
run: go test -json ./... > test.json
2935
- name: annotate tests
3036
if: always()
31-
uses: guyarb/golang-test-annotations@v0.6.0
37+
uses: guyarb/golang-test-annotations@v0.7.0
3238
with:
3339
test-results: test.json
3440
lint:
@@ -38,11 +44,9 @@ jobs:
3844
go-version: [1.20]
3945
runs-on: ubuntu-latest
4046
steps:
41-
- uses: actions/checkout@v3
42-
- uses: actions/setup-go@v3
47+
- uses: actions/checkout@v4
48+
- uses: actions/setup-go@v5
4349
with:
44-
stable: 'true'
4550
go-version: '1.20'
51+
cache: false
4652
- uses: golangci/golangci-lint-action@v3
47-
with:
48-
skip-go-installation: true

.github/workflows/releease.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,29 @@ jobs:
1515
COSIGN_EXPERIMENTAL: "1"
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0
2121

2222
- name: Install cosign
23-
uses: sigstore/cosign-installer@v2
23+
uses: sigstore/cosign-installer@v3
2424

2525
- name: Set env
2626
run: echo "TAG_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
2727

2828
- name: Set up Docker Buildx
29-
uses: docker/setup-buildx-action@v2
29+
uses: docker/setup-buildx-action@v3
3030

3131
- name: Login to GitHub Container Registry
32-
uses: docker/login-action@v2
32+
uses: docker/login-action@v3
3333
with:
3434
registry: ghcr.io
3535
username: ${{ secrets.USERNAME }}
3636
password: ${{ secrets.CR_PAT }}
3737

3838
- name: Build and push
3939
id: build-and-push
40-
uses: docker/build-push-action@v3
40+
uses: docker/build-push-action@v5
4141
with:
4242
context: .
4343
push: true
@@ -77,18 +77,18 @@ jobs:
7777
runs-on: ubuntu-latest
7878
steps:
7979
- name: checkout
80-
uses: actions/checkout@v3
80+
uses: actions/checkout@v4
8181
with:
8282
fetch-depth: 0
8383
- name: Set up Go
84-
uses: actions/setup-go@v3
84+
uses: actions/setup-go@v5
8585
with:
8686
go-version: "1.20"
8787

8888
- name: Run GoReleaser
89-
uses: goreleaser/goreleaser-action@v4
89+
uses: goreleaser/goreleaser-action@v5
9090
with:
9191
version: latest
92-
args: release --rm-dist
92+
args: release --clean
9393
env:
9494
GITHUB_TOKEN: ${{ secrets.CR_PAT }}

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ passenger-go-exporter
2020

2121
# Dependency directories (remove the comment below to include it)
2222
# vendor/
23+
24+
dist/

.golangci.yml .golangci.yaml

File renamed without changes.

.goreleaser.yaml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
version: 1
2+
3+
before:
4+
hooks:
5+
# You may remove this if you don't use go modules.
6+
- go mod tidy
7+
# you may remove this if you don't need go generate
8+
- go generate ./...
9+
builds:
10+
- env:
11+
- CGO_ENABLED=0
12+
goos:
13+
- linux
14+
- windows
15+
- darwin
16+
goarch:
17+
- amd64
18+
archives:
19+
- id: release-format
20+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
21+
format: zip
22+
23+
checksum:
24+
name_template: "checksums.txt"
25+
snapshot:
26+
name_template: "{{ .Tag }}-next"
27+
changelog:
28+
sort: asc
29+
filters:
30+
exclude:
31+
- "^docs:"
32+
- "^test:"
33+
- "^ci:"

.goreleaser.yml

-32
This file was deleted.

test/kubernetes/run.sh

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ REPO_HOME=$(git rev-parse --show-toplevel)
66
kubectl delete namespace test --ignore-not-found=true --wait=true
77
kubectl create namespace test
88

9+
910
# deploy
1011
kubectl apply -k ${REPO_HOME}/test/kubernetes/test
1112
kubectl set image -n test deployment/example example=ghcr.io/rakutentech/passenger-go-exporter/passenger-app:$PASSENGER_VERSION

test/passenger-app/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM ruby:3.3
22

3-
ARG ARG_RAILS_VERSION=7.1.3
3+
ARG ARG_RAILS_VERSION=7.0.8
44
ARG ARG_PASSENGER_VERSION=6.0.20
55
ENV RAILS_VERSION $ARG_RAILS_VERSION
66
ENV PASSENGER_VERSION $ARG_PASSENGER_VERSION

0 commit comments

Comments
 (0)