Feature/build scripts update #8
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
# SPDX-License-Identifier: Apache-2.0 | |
name: build | |
on: pull_request | |
jobs: | |
build: | |
# this is to prevent the job to run at forked projects | |
if: github.repository == 'aws/aws-nitro-enclaves-k8s-device-plugin' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Extract Go version | |
run: | | |
GO_VERSION=$(grep '^go' go.mod | awk '{print $2}') | |
echo "GO_VERSION=$GO_VERSION" >> $GITHUB_ENV | |
- name: Set up Go ${{ env.GO_VERSION }} | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- name: Build | |
run: go build -v ./cmd/k8s-device-plugin/k8s-device-plugin.go | |
- name: Test | |
run: go test -v ./... |