Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #65 - Feature Request: Build Verification Workflow #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}'