Skip to content

Commit

Permalink
ci: build in place
Browse files Browse the repository at this point in the history
  • Loading branch information
cnfatal committed Aug 18, 2022
1 parent b804e97 commit 3fa55c4
Showing 1 changed file with 7 additions and 22 deletions.
29 changes: 7 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
env:
# Use docker.io for Docker Hub if empty
REGISTRY: docker.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
Expand All @@ -26,36 +31,16 @@ jobs:
# Build binary
- name: Build
run: make build-all
- name: Artifact
# https://github.com/actions/upload-artifact
uses: actions/upload-artifact@v3
with:
name: binaries
path: bin/*

- name: Release
# https://github.com/softprops/action-gh-release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: bin/modelx-*

image:
runs-on: ubuntu-latest
needs:
- build
env:
# Use docker.io for Docker Hub if empty
REGISTRY: docker.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: binaries
path: bin
# https://github.com/docker/setup-buildx-action
- uses: docker/setup-buildx-action@v2
- uses: docker/setup-buildx-action@v2
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
Expand Down

0 comments on commit 3fa55c4

Please sign in to comment.