mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-19 07:01:02 +01:00
516848783e
### Describe Your Changes
optionally build vmagent image for benchmark
needed for https://github.com/VictoriaMetrics/ops/pull/1297
### Checklist
The following checks are **mandatory**:
- [ ] My change adheres [VictoriaMetrics contributing
guidelines](https://docs.victoriametrics.com/contributing/).
(cherry picked from commit 6b128da811
)
57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
name: benchmark
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- cluster
|
|
paths-ignore:
|
|
- "docs/**"
|
|
- "**.md"
|
|
- "dashboards/**"
|
|
- "deployment/**.yml"
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
- reopened
|
|
- labeled
|
|
branches:
|
|
- master
|
|
- cluster
|
|
paths-ignore:
|
|
- "docs/**"
|
|
- "**.md"
|
|
- "dashboards/**"
|
|
- "deployment/**.yml"
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build-streamaggr-benchmark-image:
|
|
name: build
|
|
runs-on: ubuntu-latest
|
|
if: contains(github.event.pull_request.labels.*.name, 'streamaggr-benchmark')
|
|
steps:
|
|
- name: Code checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Package VMAgent Docker image for benchmark
|
|
run: |
|
|
SKIP_SCRATCH_BUILD=true \
|
|
DOCKER_BUILD_OPTS='--cache-to type=gha,mode=max --cache-from type=gha' \
|
|
PKG_TAG=${{ github.event.pull_request.head.sha }} \
|
|
DOCKER_REGISTRY=ghcr.io \
|
|
TARGET_PLATFORM=linux/amd64 make publish-vmagent
|