Skip to content

Commit

Permalink
Merge pull request #66 from seatgeek/actions
Browse files Browse the repository at this point in the history
Github actions
  • Loading branch information
burdandrei authored Mar 3, 2021
2 parents dcc6a1f + 8c70342 commit 62bb199
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 47 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build
# Run this workflow every time a new commit pushed to your repository
on: [pull_request]

jobs:
# Set the job key. The key is displayed as the job name
# when a job name is not provided
build:
# Name the Job
name: build
# Set the type of machine to run on
runs-on: ubuntu-20.04

steps:
# Checks out a copy of your repository on the ubuntu-latest machine
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Go environment
uses: actions/[email protected]
- name: build
run: GOBUILD="linux-amd64 windows-amd64 darwin-amd64" make -j build
- name: artifacts Linux
uses: actions/upload-artifact@v2
with:
name: nomad-helper-linux-amd64
path: build/nomad-helper-linux-amd64
- name: artifacts MacOS
uses: actions/upload-artifact@v2
with:
name: nomad-helper-darwin-amd64
path: build/nomad-helper-darwin-amd64
- name: artifacts Windows
uses: actions/upload-artifact@v2
with:
name: nomad-helper-windows-amd64
path: build/nomad-helper-windows-amd64
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
on:
release:
types:
- created

name: Upload Release Assets

jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Go environment
uses: actions/[email protected]
- name: build
run: GOBUILD="linux-amd64 windows-amd64 darwin-amd64" make -j build
- name: Upload linux binary
id: upload-release-asset-linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/nomad-helper-linux-amd64
asset_name: nomad-helper-linux-amd64
asset_content_type: application/octet-stream
- name: Upload MacOS binary
id: upload-release-asset-macos
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/nomad-helper-darwin-amd64
asset_name: nomad-helper-darwin-amd64
asset_content_type: application/octet-stream
- name: Upload Windows binary
id: upload-release-asset-windows
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./build/nomad-helper-windows-amd64
asset_name: nomad-helper-windows-amd64
asset_content_type: application/octet-stream
46 changes: 0 additions & 46 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.8
FROM alpine

# Adding ca-certificates for external communication, and openssh
# for attaching to remote nodes
Expand Down

0 comments on commit 62bb199

Please sign in to comment.