diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index 28e50c0..da94523 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -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 diff --git a/.github/workflows/build-verification.yml b/.github/workflows/build-verification.yml new file mode 100644 index 0000000..f7dfd89 --- /dev/null +++ b/.github/workflows/build-verification.yml @@ -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 }}' \ No newline at end of file