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 #44 - Feature Request: Build Verification Workflow #45

Open
wants to merge 1 commit into
base: main
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 @@ -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 }}'