-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Build | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
tags: | ||
type: string | ||
description: The Docker Tags (see docker/metadata-action@v4 for available values) | ||
required: true | ||
|
||
jobs: | ||
build-k6: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Build/Push | ||
uses: coopTilleuls/action-docker-build-push@v10 | ||
with: | ||
IMAGE_NAME: k6-runner | ||
BUILD_CONTEXT: release | ||
REGISTRY_JSON_KEY: ${{ secrets.GITHUB_TOKEN }} | ||
IMAGE_REPOSITORY: ghcr.io/cooptilleuls | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: CD | ||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '*' | ||
|
||
pull_request: | ||
types: [ opened, reopened, synchronize, labeled ] | ||
|
||
jobs: | ||
remove-deploy-label: | ||
name: Remove deploy label | ||
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'deploy') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: mondeja/remove-labels-gh-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
labels: | | ||
deploy | ||
build: | ||
name: Build | ||
if: github.event_name != 'pull_request' || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'deploy')) | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=ref,event=tag | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=sha |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM grafana/xk6:latest as builder | ||
RUN xk6 build --with github.com/grafana/xk6-redis --with github.com/grafana/xk6-output-prometheus-remote | ||
|
||
FROM alpine:3.18 as release | ||
RUN adduser -D -u 12345 -g 12345 k6 | ||
COPY --from=builder /xk6/k6 /usr/bin/k6 | ||
USER k6 | ||
WORKDIR /home/k6 | ||
ENTRYPOINT ["k6"] |