Firewall #134
Workflow file for this run
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: Pipeline | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Prepare test | |
run: make prepare_test | |
- name: Check running containers | |
run: docker ps -a | |
- name: Set up Go 1.20 | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '1.20.x' | |
id: go | |
- name: Test | |
run: make test_ci | |
# - name: Submit coverage | |
# run: goveralls -coverprofile=coverage.out -service=circle-ci -repotoken ${{ secrets.COVERALLS_TOKEN }} | |
- name: Submit coverage report | |
uses: coverallsapp/github-action@1.1.3 | |
with: | |
path-to-lcov: coverage.lcov | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Make binary | |
run: make linux | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Get release details | |
run: | | |
echo "head_version=$(git tag --points-at=HEAD|sed -e 's/v//')" >> $GITHUB_ENV | |
echo "version=$(git describe --tags --abbrev=0|sed -e 's/v//')" >> $GITHUB_ENV | |
- run: echo "::warning ::Release ${{ env.head_version }} ${{ env.version }}" | |
- name: Build docker image | |
if: ${{ github.ref != 'refs/heads/master' }} | |
uses: docker/build-push-action@v2 | |
with: | |
push: false | |
tags: odyseeteam/player-server:${{ env.version }} | |
context: . | |
- name: Build and push docker image | |
if: ${{ github.ref == 'refs/heads/master' }} | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
tags: odyseeteam/player-server:${{ env.version }},odyseeteam/player-server:latest | |
context: . |