Skip to content

Commit

Permalink
Issue open-horizon#65 - Feature Request: Build Verification Workflow
Browse files Browse the repository at this point in the history
Signed-off-by: blakep7 <[email protected]>
  • Loading branch information
blakep7 committed Aug 18, 2023
1 parent 2e308a8 commit 1dbcf71
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ env:
jobs:
# Build and pushes to Dockerhub
build-push:
# Prevent this action from running in forks
if: github.repository_owner == 'open-horizon'

runs-on: ubuntu-20.04

# Environment variables available to all steps
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/build-verification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build Verification

on: workflow_dispatch

jobs:
build-verification:

runs-on: ubuntu-20.04

env:
GOPATH: ${{ github.workspace }}/go
IMAGE_NAME: amd64_vault
BINARY_NAME: hznvaultauth
IMAGE_REPO: 'openhorizon-build_verification'
REPO_DIR: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}



steps:
# Checkout our Github repo
- name: Checkout Github Repo
uses: actions/checkout@v2
with:
path: go/src/github.com/${{ github.repository }}

# Prepare the environment
- name: Set up golang 1.19
uses: actions/setup-go@v2
with:
go-version: '1.19'
check-latest: true

# Configure version variables for later steps, stored in our workflow env. variables
- name: Config Version Variables
id: config-version
run: |
cd ${REPO_DIR}
echo "VERSION=$(sed -n 's/^VERSION ?= //p' Makefile | cut -d '$' -f 1)" >> $GITHUB_OUTPUT
# Compile Vault and Build Docker Images
- name: Compile and Build Docker Images
run: |
cd ${REPO_DIR}
make clean
make
docker image ls
env:
VERSION: '${{ steps.config-version.outputs.VERSION }}-${{ github.run_number }}'
DOCKER_INAME: '${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}'

0 comments on commit 1dbcf71

Please sign in to comment.