Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

Update README.md

Update README.md #162

Workflow file for this run

name: Merge Checks
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
name: Test
runs-on: ubuntu-20.04
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.17
- name: Check out code into the Go module directory
uses: actions/[email protected]
- name: Run tests
run: go test -v ./...
buildLinux:
name: Build Linux
runs-on: ubuntu-20.04
needs:
- test
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.17
- name: Check out code into the Go module directory
uses: actions/[email protected]
- name: Get dependencies
run: |
go mod tidy
- name: Build Linux x64
run: GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o build/hermes_linux_amd64 github.com/c16a/hermes/app
- name: Store Linux x64 artifacts
uses: actions/upload-artifact@v2
with:
name: hermes_linux_amd64
path: build/hermes_linux_amd64
- name: Build Linux ARM 64-bit
run: GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o build/hermes_linux_arm64 github.com/c16a/hermes/app
- name: Store Linux ARM 64-bit artifacts
uses: actions/upload-artifact@v2
with:
name: hermes_linux_arm64
path: build/hermes_linux_arm64
- name: Build Linux OpenPOWER 64-bit
run: GOOS=linux GOARCH=ppc64le go build -ldflags="-s -w" -o build/hermes_linux_ppc64le github.com/c16a/hermes/app
- name: Store Linux OpenPOWER 64-bit artifacts
uses: actions/upload-artifact@v2
with:
name: hermes_linux_ppc64le
path: build/hermes_linux_ppc64le
buildWindows:
name: Build Windows
runs-on: ubuntu-20.04
needs:
- test
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.17
- name: Check out code into the Go module directory
uses: actions/[email protected]
- name: Get dependencies
run: |
go mod tidy
- name: Build Windows x64
run: GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o build/hermes_windows_amd64.exe github.com/c16a/hermes/app
- name: Store Windows x64 artifacts
uses: actions/upload-artifact@v2
with:
name: hermes_windows_amd64.exe
path: build/hermes_windows_amd64.exe
buildMac:
name: Build macOS
runs-on: ubuntu-20.04
needs:
- test
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.17
- name: Check out code into the Go module directory
uses: actions/[email protected]
- name: Get dependencies
run: |
go mod tidy
- name: Build macOS Intel x64
run: GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o build/hermes_mac_amd64 github.com/c16a/hermes/app
- name: Store macOS Intel x64 artifacts
uses: actions/upload-artifact@v2
with:
name: hermes_mac_amd64
path: build/hermes_mac_amd64
- name: Build macOS Apple Silicon
run: GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -o build/hermes_mac_arm64 github.com/c16a/hermes/app
- name: Store macOS Apple Silicon artifacts
uses: actions/upload-artifact@v2
with:
name: hermes_mac_arm64
path: build/hermes_mac_arm64
docker:
name: Build Image
runs-on: ubuntu-20.04
needs:
- test
- buildLinux
- buildWindows
- buildMac
steps:
- name: Check out code
uses: actions/[email protected]
- name: Setup buildx
uses: docker/[email protected]
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: $GITHUB_ACTOR
password: ${{ secrets.CR_PAT }}
- name: Build and push
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
username: $GITHUB_ACTOR
password: ${{ secrets.CR_PAT }}
push: false
tags: |
ghcr.io/c16a/hermes/hermes:latest