Skip to content

fix version

fix version #32

Workflow file for this run

name: build
on:
push:
branches:
- 'master'
tags:
- 'v*'
pull_request:
branches:
- 'master'
jobs:
test:
runs-on: ubuntu-latest
name: Test
env:
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: Setup
run: |
git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/
go install github.com/golang/mock/mockgen@v1.6.0
go install entgo.io/ent/cmd/ent@latest
make cache
make mocks
- name: Run tests
run: make test
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: name/app
tags: |
pattern={{version}}
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}