Skip to content

Commit

Permalink
Issue open-horizon#44 - Feature Request: Build Verification Workflow
Browse files Browse the repository at this point in the history
Signed-off-by: blakep7 <pearsonblake9@gmail.com>
  • Loading branch information
blakep7 committed Aug 18, 2023
1 parent 86863ed commit fa94a47
Show file tree
Hide file tree
Showing 2 changed files with 45 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 @@ -19,6 +19,9 @@ env:
jobs:
# Build FDO-Support and pushes it 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
42 changes: 42 additions & 0 deletions .github/workflows/build-verification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build Verification

on: workflow_dispatch

jobs:
build-verification:

runs-on: ubuntu-20.04

env:
REPO_DIR: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}

steps:
# Checkout our Github repo
- name: Checkout Github Repo
uses: actions/checkout@v3
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/export VERSION ?= //p' Makefile | cut -d '$' -f 1)" >> $GITHUB_OUTPUT
# Compile FDO-Support 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 }}'

0 comments on commit fa94a47

Please sign in to comment.