Bump github.com/valyala/fasthttp from 1.52.0 to 1.55.0 (#339)

This commit is contained in:
wood 2024-09-05 15:59:32 +08:00
parent 89aea97310
commit 034e7e3834
6 changed files with 15 additions and 354 deletions

View File

@ -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 }}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -1,4 +1,4 @@
name: Build and release docker images name: Build docker images
on: on:
push: push:
paths-ignore: paths-ignore:
@ -10,37 +10,16 @@ on:
tags: tags:
- '*' - '*'
env:
IMAGE_NAME: webp-server-go
jobs: jobs:
docker: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 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 - name: Set up QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
@ -48,27 +27,17 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
- name: Cache Docker layers - name: Login to Docker Hub
uses: actions/cache@v2 uses: docker/login-action@v3
with: with:
path: /tmp/.buildx-cache username: woodchen
key: ${{ runner.os }}-buildx-${{ github.sha }} password: ${{ secrets.ACCESS_TOKEN }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build and push latest images - name: Build and push
uses: docker/build-push-action@v3 uses: docker/build-push-action@v5
with: with:
context: . context: .
platforms: linux/amd64,linux/arm64 file: Dockerfile
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: woodchen/${{ env.IMAGE_NAME }}:latest
labels: ${{ steps.meta.outputs.labels }} platforms: linux/amd64,linux/arm64
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