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
12 changes: 9 additions & 3 deletions .github/workflows/ci-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,27 @@ on:
- "site/**"
- "README.md"
- "Dockerfile.site"
permissions:
contents: read
packages: write

jobs:

build:
runs-on: ubuntu-latest

steps:
- name: checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
persist-credentials: false

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

- name: set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
tags:
pull_request:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -18,15 +21,17 @@ jobs:
sudo rm -rf /usr/local/share/boost
docker system prune -af

- name: checkout
uses: actions/checkout@v6
with:
persist-credentials: false

- name: set up go 1.25
uses: actions/setup-go@v6
with:
go-version: "1.25"
id: go

- name: checkout
uses: actions/checkout@v6

- name: build and test
run: |
go test -v -timeout=180s -p 1 -covermode=atomic -coverprofile=$GITHUB_WORKSPACE/profile.cov_tmp ./...
Expand All @@ -47,20 +52,18 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: latest
version: "latest"

- name: golangci-lint on example directory
uses: golangci/golangci-lint-action@v9
with:
version: latest
version: "latest"
args: --config ../../.golangci.yml
working-directory: examples/plugin

- name: install goveralls
run: |
go install github.com/mattn/goveralls@latest

- name: submit coverage
run: $(go env GOPATH)/bin/goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov
run: |
go install github.com/mattn/goveralls@latest
goveralls -service="github" -coverprofile=$GITHUB_WORKSPACE/profile.cov
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 17 additions & 17 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,19 @@ on:
types: [completed]
# NOTE: Do NOT add `branches:` filter here - it breaks tag builds

permissions:
contents: read
packages: write

env:
REGISTRY_GHCR: ghcr.io
REGISTRY_DOCKER: docker.io
IMAGE_NAME: ${{ github.actor }}/reproxy

permissions:
contents: read
packages: write

jobs:
build:
if: >-
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'push' &&
(github.event.workflow_run.head_branch == 'master' ||
startsWith(github.event.workflow_run.head_branch, 'v'))
strategy:
Expand All @@ -39,19 +38,20 @@ jobs:
uses: actions/checkout@v6
with:
ref: ${{ github.event.workflow_run.head_sha }}
persist-credentials: false

- name: set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: login to ghcr.io
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PKG_TOKEN }}

- name: login to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
Expand All @@ -65,7 +65,7 @@ jobs:

- name: build and push to ghcr.io
id: build-ghcr
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
platforms: ${{ matrix.platform }}
Expand All @@ -77,7 +77,7 @@ jobs:

- name: build and push to Docker Hub
id: build-dockerhub
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
platforms: ${{ matrix.platform }}
Expand All @@ -96,15 +96,15 @@ jobs:
touch "/tmp/digests/dockerhub/${digest_dockerhub#sha256:}"

- name: upload ghcr digest
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: digests-ghcr-${{ matrix.artifact }}
path: /tmp/digests/ghcr/*
if-no-files-found: error
retention-days: 1

- name: upload dockerhub digest
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: digests-dockerhub-${{ matrix.artifact }}
path: /tmp/digests/dockerhub/*
Expand All @@ -117,14 +117,14 @@ jobs:

steps:
- name: download ghcr digests
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
path: /tmp/digests/ghcr
pattern: digests-ghcr-*
merge-multiple: true

- name: download dockerhub digests
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
path: /tmp/digests/dockerhub
pattern: digests-dockerhub-*
Expand All @@ -148,17 +148,17 @@ jobs:
echo "All $expected digests present for both registries"

- name: set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: login to ghcr.io
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PKG_TOKEN }}

- name: login to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
tags:
- 'v*'

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
Expand All @@ -13,14 +16,15 @@ jobs:
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false

- name: set up go
uses: actions/setup-go@v6
with:
go-version: "1.25"

- name: run goreleaser
uses: goreleaser/goreleaser-action@v6
uses: goreleaser/goreleaser-action@v7
with:
version: ~> 1.25
args: release --clean
Expand Down
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ linters:
gosec:
excludes:
- G117
- G118
- G704
goconst:
min-len: 2
Expand Down