Cleanup operating systems #197
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: Publish docker image | |
on: | |
push: | |
pull_request: | |
jobs: | |
test: | |
name: run unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
- | |
name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: go.mod | |
cache: true | |
- | |
name: Run the tests | |
run: make test-unit | |
publish: | |
runs-on: ubuntu-latest | |
needs: test | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v3 | |
- | |
name: Log in to Docker Hub | |
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- | |
name: run make | |
env: | |
REGISTRY_NAMESPACE: syseleven | |
run: make IMAGE_TAG=$(basename $GITHUB_REF) docker-image-publish | |
shell: bash |