Skip to content

v0.3.0

v0.3.0 #23

Workflow file for this run

---
name: "release"
on:
release:
types:
- published
jobs:
build:
name: "Build"
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.19.x'
- name: Install xk6
run: go install go.k6.io/xk6/cmd/xk6@latest
- name: Build a new k6 binary with the remote write extension
run: xk6 build --with github.com/grafana/xk6-remote-write="$PWD/../xk6-client-prometheus-remote"
- name: Change permissions of the binary
run: chmod +x k6
- name: Duplicate binary
run: cp k6 k6_rw_${{ github.event.release.tag_name }}_linux_amd64
- name: Upload artifacts to the release
uses: AButler/upload-release-assets@v2.0
with:
files: 'k6_*'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: "Docker: Set up buildx"
uses: docker/setup-buildx-action@v1
- name: "Docker: Login into GH registry"
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: "Docker: Build and push image"
uses: docker/build-push-action@v2
with:
context: .
push: true
file: Dockerfile
tags: ghcr.io/grafana/xk6-client-prometheus-remote:latest,ghcr.io/grafana/xk6-client-prometheus-remote:${{ github.event.release.tag_name }}