Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: CI
permissions:
contents: write
pull-requests: write
packages: write

on: [push, pull_request]
jobs:
Expand All @@ -12,7 +13,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.20.x"
go-version: "1.23"

- name: Set go cache paths
id: go-cache-paths
Expand Down Expand Up @@ -47,9 +48,9 @@ jobs:
run: make lint

- name: Start Redis
uses: supercharge/redis-github-action@1.5.0
uses: supercharge/redis-github-action@1.8.0
with:
redis-version: 6.2.6
redis-version: 7.4.2

- name: Test
env:
Expand Down Expand Up @@ -85,7 +86,10 @@ jobs:
steps:
- uses: actions/setup-go@v4
with:
go-version: "1.20"
go-version: "1.23"

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set go cache paths
id: go-cache-paths
Expand All @@ -109,6 +113,13 @@ jobs:
path: ${{ steps.go-cache-paths.outputs.go-mod }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
Expand Down
21 changes: 21 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,24 @@ archives:
- LICENSE
- README.md
- CHANGELOG.md

dockers:
- image_templates:
- "ghcr.io/didil/inhooks:{{ .Tag }}-amd64"
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/amd64"
- image_templates:
- "ghcr.io/didil/inhooks:{{ .Tag }}-arm64"
use: buildx
build_flag_templates:
- "--pull"
- "--platform=linux/arm64"
goarch: arm64

docker_manifests:
- name_template: "ghcr.io/didil/inhooks:{{ .Tag }}"
image_templates:
- "ghcr.io/didil/inhooks:{{ .Tag }}-amd64"
- "ghcr.io/didil/inhooks:{{ .Tag }}-arm64"
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Base
FROM golang:1.20-alpine AS base
FROM golang:1.23-alpine AS base

RUN apk update && apk add --no-cache build-base
RUN apk add git
Expand All @@ -16,7 +16,7 @@ COPY . .
RUN make build

# Final
FROM alpine:3.17
FROM alpine:3.21

WORKDIR /app

Expand Down
3 changes: 1 addition & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
version: '3'

services:
redis:
image: redis:6.2.12
image: redis:7.4.2
volumes:
- redis-data:/data
ports:
Expand Down
Loading
Loading