mirror of
https://github.com/woodchen-ink/webp_server_go.git
synced 2025-07-18 13:42:02 +08:00
Bump github.com/valyala/fasthttp from 1.52.0 to 1.55.0 (#339)
This commit is contained in:
parent
89aea97310
commit
034e7e3834
90
.github/workflows/CI.yaml
vendored
90
.github/workflows/CI.yaml
vendored
@ -1,90 +0,0 @@
|
||||
name: CI check on every PR
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'Makefile'
|
||||
- 'config.json'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: CI check on every push and PR
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.23'
|
||||
|
||||
- name: Setup necessary packages
|
||||
run: |
|
||||
sudo apt update && sudo apt install libvips-dev -y
|
||||
|
||||
- name: run test cases
|
||||
run: make && make test
|
||||
|
||||
image-test:
|
||||
name: Check for image build and CVE
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
|
||||
- name: Build and load image
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
load: true
|
||||
tags: |
|
||||
ghcr.io/${{ github.event.repository.full_name }}:latest
|
||||
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
|
||||
|
||||
- name: Install trivy
|
||||
run: |
|
||||
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add -
|
||||
echo deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list.d/trivy.list
|
||||
sudo apt-get update
|
||||
sudo apt-get install trivy -y
|
||||
|
||||
- name: Scan for CVE
|
||||
uses: mathiasvr/command-output@v1
|
||||
id: trivy
|
||||
with:
|
||||
run: |
|
||||
trivy image --no-progress --severity "HIGH,CRITICAL" --ignore-unfixed ghcr.io/${{ github.event.repository.full_name }}
|
||||
|
||||
- name: Print CVE
|
||||
run: |
|
||||
echo "${{ steps.trivy.outputs.stdout }}"
|
||||
|
||||
- name: Comment PR for CVE
|
||||
uses: thollander/actions-comment-pull-request@v2
|
||||
with:
|
||||
message: |
|
||||
```
|
||||
${{ steps.trivy.outputs.stdout }}
|
||||
```
|
||||
comment_tag: cve
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
35
.github/workflows/codecov.yaml
vendored
35
.github/workflows/codecov.yaml
vendored
@ -1,35 +0,0 @@
|
||||
name: CI check on every push
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'Makefile'
|
||||
- 'config.json'
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
name: CI check and codecov on every push
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.23'
|
||||
|
||||
- name: Setup necessary packages
|
||||
run: |
|
||||
sudo apt update && sudo apt install libvips-dev -y
|
||||
|
||||
- name: run test cases
|
||||
run: make && make test
|
||||
|
||||
- name: Codecov
|
||||
uses: codecov/codecov-action@v2
|
||||
with:
|
||||
files: ./coverage.txt
|
||||
verbose: true
|
54
.github/workflows/codeql-analysis.yml
vendored
54
.github/workflows/codeql-analysis.yml
vendored
@ -1,54 +0,0 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
schedule:
|
||||
- cron: '32 20 * * 2'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'go' ]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.23'
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
78
.github/workflows/integration-test.yaml
vendored
78
.github/workflows/integration-test.yaml
vendored
@ -1,78 +0,0 @@
|
||||
name: Integration Tests
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'Makefile'
|
||||
- 'config.json'
|
||||
|
||||
jobs:
|
||||
glib_malloc:
|
||||
name: Glib malloc RAM usage test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install docker-compose
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y docker-compose
|
||||
|
||||
- name: Build image
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
push: false
|
||||
tags: ghcr.io/webp-sh/webp_server_go
|
||||
|
||||
- name: Start the container
|
||||
run: |
|
||||
cp malloc_tests/glib_malloc/docker-compose.yml ./
|
||||
docker-compose up -d
|
||||
|
||||
- name: Send Requests to Server
|
||||
run: |
|
||||
cd pics
|
||||
find * -type f -print | xargs -I {} curl -o /dev/null -H "Accept: image/webp" http://localhost:3333/{}
|
||||
|
||||
- name: Get container RAM stats
|
||||
run: |
|
||||
docker stats --no-stream
|
||||
|
||||
jemalloc:
|
||||
name: jemalloc RAM usage test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install docker-compose
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y docker-compose
|
||||
|
||||
- name: Build image
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64
|
||||
push: false
|
||||
tags: ghcr.io/webp-sh/webp_server_go
|
||||
|
||||
- name: Start the container
|
||||
run: |
|
||||
cp malloc_tests/jemalloc/docker-compose.yml ./
|
||||
docker-compose up -d
|
||||
|
||||
- name: Send Requests to Server
|
||||
run: |
|
||||
cd pics
|
||||
find * -type f -print | xargs -I {} curl -o /dev/null -H "Accept: image/webp" http://localhost:3333/{}
|
||||
|
||||
- name: Get container RAM stats
|
||||
run: |
|
||||
docker stats --no-stream
|
51
.github/workflows/release_binary.yaml
vendored
51
.github/workflows/release_binary.yaml
vendored
@ -1,51 +0,0 @@
|
||||
name: Release Binaries
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'Makefile'
|
||||
- 'config.json'
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Create Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Make WebP Server Go (amd64)
|
||||
run: |
|
||||
docker run --rm -w /app -v "$(pwd)":/app webpsh/libvips make
|
||||
sudo chown -R $USER:$USER builds/
|
||||
sha256sum builds/webp-server-linux-amd64 > builds/webp-server-linux-amd64.sha256
|
||||
|
||||
- name: Make WebP Server Go (arm64)
|
||||
run: |
|
||||
docker run --rm -w /app -v "$(pwd)":/app --platform linux/arm64 webpsh/libvips make
|
||||
sudo chown -R $USER:$USER builds/
|
||||
sha256sum builds/webp-server-linux-arm64 > builds/webp-server-linux-arm64.sha256
|
||||
|
||||
- name: Check for ldd version(AMD64 only)
|
||||
run: |
|
||||
ldd builds/webp-server-linux-amd64
|
||||
|
||||
- uses: "marvinpinto/action-automatic-releases@latest"
|
||||
with:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
prerelease: true
|
||||
title: "WebP Server Go"
|
||||
files: |
|
||||
builds/webp-server-linux-amd64
|
||||
builds/webp-server-linux-amd64.sha256
|
||||
builds/webp-server-linux-arm64
|
||||
builds/webp-server-linux-arm64.sha256
|
61
.github/workflows/release_docker_image.yaml
vendored
61
.github/workflows/release_docker_image.yaml
vendored
@ -1,4 +1,4 @@
|
||||
name: Build and release docker images
|
||||
name: Build docker images
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
@ -10,65 +10,34 @@ on:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
env:
|
||||
IMAGE_NAME: webp-server-go
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: |
|
||||
ghcr.io/${{ github.event.repository.full_name }}
|
||||
webpsh/webp_server_go
|
||||
webpsh/webp-server-go
|
||||
webpsh/webps
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
username: woodchen
|
||||
password: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
- name: Build and push latest images
|
||||
uses: docker/build-push-action@v3
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
file: Dockerfile
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
|
||||
|
||||
- name: Move cache
|
||||
run: |
|
||||
rm -rf /tmp/.buildx-cache
|
||||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
||||
tags: woodchen/${{ env.IMAGE_NAME }}:latest
|
||||
platforms: linux/amd64,linux/arm64
|
||||
|
Loading…
x
Reference in New Issue
Block a user