-
Notifications
You must be signed in to change notification settings - Fork 3
27 lines (25 loc) · 989 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pull image from ghcr.io
run: docker pull ghcr.io/tmck-code/pokesay:latest
- name: Build go binary assets
run: docker run -v ${PWD}:/usr/local/src ghcr.io/tmck-code/pokesay:latest ./build/scripts/build_assets.sh
- name: Build go binaries
run: docker run -v ${PWD}:/usr/local/src ghcr.io/tmck-code/pokesay:latest ./build/scripts/build.sh
- name: Check build
run: ls -alh build/bin
- name: Test build
run: echo w | ./build/bin/pokesay-linux-amd64
- name: Run unit tests
run: docker run -v ${PWD}:/usr/local/src ghcr.io/tmck-code/pokesay:latest go test -v ./test/