Skip to content
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
11 changes: 7 additions & 4 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,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-latest

# Environment variables available to all steps
Expand Down Expand Up @@ -86,15 +89,15 @@ jobs:

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

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

# Configure version variables for later steps, stored in our workflow env. variables
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/build-verification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build Verification

on:
push:
branches-ignore:
- main
workflow_dispatch:

jobs:
build-verification:
runs-on: ubuntu-latest

env:
GOPATH: ${{ github.workspace }}/go
REPO_DIR: ${{ github.workspace }}/go/src/github.com/${{ github.repository_owner }}/${{ github.event.repository.name }}

steps:
- name: Checkout GitHub Repo
uses: actions/checkout@v4
with:
path: go/src/github.com/${{ github.repository_owner }}/${{ github.event.repository.name }}

- name: Set up Go 1.23
uses: actions/setup-go@v5
with:
go-version: '1.23'
check-latest: true

- name: Config Version Variables
id: config-version
run: |
cd "$REPO_DIR"
VERSION=$(sed -n 's/export VERSION ?= //p' Makefile | cut -d '$' -f 1)
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT

- 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 }}'