Skip to content

use buildx ro create image #18

use buildx ro create image

use buildx ro create image #18

Workflow file for this run

name: Verification Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
# docker run --rm -it -u "$(id -u):$(id -g)" -v "${PWD}:/xk6" grafana/xk6 build v0.43.1 \
# --with github.com/mostafa/xk6-kafka@v0.17.0
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '^1.22' # The Go version to download (if necessary) and use.
- name: install xk6
run: go install go.k6.io/xk6/cmd/xk6@latest
- name: create k6 executable
run: xk6 build --with github.com/LeonAdato/xk6-output-statsd
# - name: build image
# run: docker build -t k6-statsd .
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set outputs for docker build
id: vars
run: |
echo "image_name=ghcr.io/${{ github.repository }}" >> $GITHUB_OUTPUT
echo "image_tag=$(git rev-parse --short HEAD)-${{ github.run_id }}" >> $GITHUB_OUTPUT
- name: Build Docker image and push to GitHub Container Registry
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: false
tags: ${{ steps.vars.outputs.image_name }}:latest, ${{ steps.vars.outputs.image_name }}:${{ steps.vars.outputs.image_tag }}