moth/.github/workflows/test.yml

55 lines
1.4 KiB
YAML
Raw Normal View History

2020-09-17 18:56:40 -06:00
name: Tests
on: [push]
jobs:
test-mothd:
name: Test mothd
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.13
- name: Retrieve code
uses: actions/checkout@v1
- name: Test
run: go test ./...
2020-09-18 12:52:04 -06:00
2020-09-18 12:15:11 -06:00
publish:
name: Publish latest build
runs-on: ubuntu-latest
steps:
- name: Retrieve code
uses: actions/checkout@v1
2020-09-18 13:12:54 -06:00
- name: Login to GitHub Packages Docker Registry
uses: docker/login-action@v1
2020-09-18 12:15:11 -06:00
with:
registry: docker.pkg.github.com
2020-09-18 13:12:54 -06:00
username: ${{ github.repository_owner }}
2020-09-18 12:15:11 -06:00
password: ${{ secrets.GITHUB_TOKEN }}
2020-09-18 13:12:54 -06:00
- name: Login to DockerHub
uses: docker/login-action@v1
2020-09-18 12:15:11 -06:00
with:
username: neale
password: ${{ secrets.DOCKER_TOKEN }}
2020-09-18 13:12:54 -06:00
- name: Build and push moth image
uses: docker/build-push-action@v2
with:
2020-09-18 12:15:11 -06:00
target: moth
2020-09-18 13:12:54 -06:00
file: build/package/Containerfile
2020-09-18 13:19:36 -06:00
tags: |
dirtbags/moth:latest
docker.pkg.github.com/dirtbags/moth/moth:latest
2020-09-18 12:15:11 -06:00
2020-09-18 13:12:54 -06:00
- name: Build and push moth-devel image
2020-09-18 12:15:11 -06:00
uses: docker/build-push-action@v2
with:
2020-09-18 13:12:54 -06:00
target: moth
file: build/package/Containerfile
tags: |
dirtbags/moth-devel:latest
docker.pkg.github.com/dirtbags/moth/moth-devel:latest