v0.3.1 #24
Workflow file for this run
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
--- | |
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/[email protected] | |
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 }} |