Support zstd compression #67
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: Build | |
on: [push, pull_request] | |
jobs: | |
build-and-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '1.16.0' | |
- name: Install Go module dependencies | |
run: | | |
go version | |
go mod download | |
- name: Build the binary natively | |
run: go build -v cmd/hoard.go | |
- name: Run the tests natively | |
run: go test -v ./... | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: jamespfennell | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build the Docker image and push to Docker Hub | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
with: | |
tags: jamespfennell/hoard:latest | |
# Only push to Docker Hub if this workflow is a push to master | |
push: ${{ github.ref == 'refs/heads/master' && github.event_name == 'push' }} | |