diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e0fb480598..f4c2b77834 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,12 +18,31 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.17 - - - name: Build - run: make build + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Login to DockerHub + if: github.event_name != 'pull_request' + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Docker metadata for Tracetest + id: meta + uses: docker/metadata-action@v3 + with: + images: kubeshop/tracetest + tags: | + type=match,pattern=v(.*) + type=sha + flavor: | + latest=true + - name: Build and push Tracetest + uses: docker/build-push-action@v2 + with: + context: . + file: Dockerfile + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}