Fix dockerfile #21
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: Go | |
on: | |
push: | |
paths: | |
- 'extension/tgbot/**' | |
branches: [ master ] | |
pull_request: | |
paths: | |
- 'extension/tgbot/**' | |
branches: [ master ] | |
jobs: | |
build: | |
name: Build & Test | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./extension/tgbot | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.17 | |
- name: Get dependencies | |
run: go mod download | |
- name: Format | |
run: test -z $(gofmt -l .) | |
- name: Build | |
run: go build -v ./... | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
push: true | |
tags: iamthen0ise/w2r-tgbot:latest | |
if: github.ref == 'refs/heads/master' |