Skip to content

Commit

Permalink
Switch to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Duchesne committed Apr 11, 2020
1 parent e7cfdbd commit 8dbd023
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 36 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build
on:
push:
branches:
- master
tags:
- "*"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go

- name: Checkout
uses: actions/checkout@v1

- name: Build
env:
CGO_ENABLED: 0
run: go build -v

- name: Run Tests
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
bash ./test.sh
bash <(curl -s https://codecov.io/bash)
- name: Docker Login
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p '${{ secrets.DOCKER_PASSWORD }}'
- name: Build Latest
if: github.ref == 'refs/heads/master'
run: |
docker build . -t coveo/credentials-sync:latest
docker push coveo/credentials-sync:latest
- name: Build Tag
if: github.ref != 'refs/heads/master'
run: |
export tag=$(cut -d'/' -f3 <<<'${{ github.ref }}')
docker build . -t coveo/credentials-sync:$tag
docker push coveo/credentials-sync:$tag
- name: Push release
if: github.ref != 'refs/heads/master'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -sL https://git.io/goreleaser | bash;
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

0 comments on commit 8dbd023

Please sign in to comment.