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

adding github workflow #38

Closed
wants to merge 1 commit into from
Closed
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
38 changes: 38 additions & 0 deletions .github/workflows/go-build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: go-build-and-publish

on:
push:
branches:
- main
release:
types:
- created

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19.2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to change this to what is currently the latest. gov1.20.5

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do it


- name: Check out code
uses: actions/checkout@v2

- name: Configure Agent
run: go run mage.go ConfigureAgent

- name: Test
run: mage Test

- name: Cross Compile
run: mage XBuildAll

- name: Publish
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure we want to publish in this workflow.

Also being that this is a scaffold repository, it may be useful to just build/test and code coverage. There is a workflow we currently use for this in porter/operator that may fit here.

I'll defer to @schristoff with what we want as a workflow in this repository.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original issue seemed to want same capabilities of ADO pipeline for GH - I think it's more useful for users building the scaffolding then anything. I'd say keep it (for now), I'm open to removing if it becomes a hassle.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@schristoff @troy0820 what changes should be done here? Let me know.

run: mage Publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: |
success() && github.event_name != 'pull_request'