diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 17587ea..f1c5be2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -13,17 +13,29 @@ jobs: steps: - name: Check Out Repo uses: actions/checkout@v2 - - uses: actions/setup-go@v2 with: go-version: '1.16.7' - run: go install go.k6.io/xk6/cmd/xk6@latest - run: xk6 build --with github.com/grafana/xk6-client-prometheus-remote@latest - - name: Get the tag name - run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV - run: chmod +x k6 - - run: mv k6 k6_${{ env.TAG }}_linux_amd64 + - run: cp k6 k6_${{ github.event.release.tag_name }}_linux_amd64 - uses: AButler/upload-release-assets@v2.0 with: files: 'k6*' repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: "Build:buildx" + uses: docker/setup-buildx-action@v1 + - name: "Build:login" + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: "Build:dockerimage" + 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 }} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f0d8b09 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM ubuntu:xenial + +COPY k6 . + +ENTRYPOINT [ "./k6" ] \ No newline at end of file