factorio-server-manager/.github/workflows/workflow.yml

47 lines
1.4 KiB
YAML
Raw Normal View History

on: [push, pull_request]
jobs:
2020-11-22 03:40:44 +02:00
test-npm:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- run: make app/bundle
2020-11-22 03:40:44 +02:00
test-go:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
go: ['1.14', '1.15', '1']
2020-11-22 03:40:44 +02:00
runs-on: ${{ matrix.os }}
name: test-go ${{ matrix.go }} (${{ matrix.os }})
2020-11-22 03:40:44 +02:00
steps:
- uses: actions/checkout@v2
- name: Setup go
uses: actions/setup-go@v2
2020-11-22 03:40:44 +02:00
with:
go-version: ${{ matrix.go }}
2020-11-22 03:40:44 +02:00
- run: cd src; go test ./...
docker-push:
runs-on: ubuntu-latest
2020-11-22 05:59:36 +02:00
if: github.event_name == 'push' && github.ref == 'refs/heads/github-actions'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-go@v2
2020-11-22 06:02:34 +02:00
- uses: docker/setup-buildx-action@v1
- name: Login to dockerhub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: make build; cp build/factorio-server-manager-linux.zip docker/factorio-server-manager-linux.zip
- id: docker_build
uses: docker/build-push-action@v2
2020-11-22 05:57:14 +02:00
with:
2020-11-22 06:06:58 +02:00
context: docker/
file: ./Dockerfile-local
2020-11-22 05:57:14 +02:00
push: true
tags: ofsm/ofsm:github-actions