Skip to content

Commit

Permalink
ci: remove Travis in favor of GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mcuadros committed May 24, 2020
1 parent 3645775 commit 906b0e6
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 31 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Docker Push
on:
release:
types:
- created
push:
branches:
- master
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build image
uses: mr-smithers-excellent/docker-build-push@v2
with:
image: mcuadros/ofelia
registry: docker.io
username: mcuadros
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Tag image
if: github.event_name == 'release'
uses: mr-smithers-excellent/docker-build-push@v2
with:
image: mcuadros/ofelia
registry: docker.io
tag: latest
username: mcuadros
password: ${{ secrets.DOCKER_PASSWORD }}
23 changes: 23 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release
on:
release:
types:
- created

jobs:
release:
strategy:
fail-fast: false
matrix:
goos: [linux, windows, darwin]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Release binaries
uses: mcuadros/go-release-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: amd64
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
strategy:
fail-fast: false
matrix:
go-version: [1.13.x, 1.14.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:

- name: Install Go
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v2

- name: Test
run: go test ./...
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

0 comments on commit 906b0e6

Please sign in to comment.