From 58dddb309e1ccf2214c200a6139081725f740613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gonz=C3=A1lez=20Lopes?= Date: Thu, 30 Sep 2021 13:16:26 +0200 Subject: [PATCH] Add Docker images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel González Lopes --- .github/workflows/release.yaml | 20 ++++++++++++++++---- Dockerfile | 5 +++++ 2 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 Dockerfile 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