GitHub Actions demo for a monorepo Go project

GitHub Actions demo for a monorepo Go project

The purpose of this repository is to demonstrate using a GitHub action as a pull request status check in a monorepo where some of the applications are Golang-based and some are not.

There are 3 folders in this demo repo:

  • mono-repo-folder-1 containing a Golang application
  • mono-repo-folder-2 containing a different Golang application
  • mono-repo-folder-3 NOT containing a Golang application

The demonstrated configuration runs go build and go test only when in a PR there are changes in the Golang applications' folders, and only for the folder in which the changes are located.

The open PRs in this repo demonstrate the different GitHub action behaviours.

Adding the action as a status check

  • First you need the action to be executed at least once. For example, opening a sample PR after the workflow file is in the main branch will execute the action.
  • Go to the repo settings -> Add branch protection rule -> Require status checks to pass before merging.
  • In the text box type the job name build-and-test and click on the suggestion that pops up.
  • Fill all other details in the Branch protection rule page and click Create to save the changes.
Similar Resources

StreamWall - WIP demo application which streams music in exchange for streaming sats

Stream Wall Music examples borrowed from https://ableandthewolf.com/ check them

Jul 9, 2022

Aws-cognito-demo-go - Source code for AWS Cognito in Go

AWS Cognito Demo in Go Source code for YouTube series, AWS Cognito in Go - https

Dec 10, 2022

Api-waf-example-cdk - Demo using sam to drive a CDK serverless api

CDK SAM Demo Demo using sam to drive a CDK serverless api Stack Setup go build -

Feb 5, 2022

Go library for accessing the GitHub API

go-github go-github is a Go client library for accessing the GitHub API v3. Currently, go-github requires Go version 1.9 or greater. go-github tracks

Dec 30, 2022

Go library for accessing trending repositories and developers at Github.

Go library for accessing trending repositories and developers at Github.

go-trending A package to retrieve trending repositories and developers from Github written in golang. This package were inspired by rochefort/git-tren

Dec 21, 2022

:fishing_pole_and_fish: Webhook receiver for GitHub, Bitbucket, GitLab, Gogs

Library webhooks Library webhooks allows for easy receiving and parsing of GitHub, Bitbucket and GitLab Webhook Events Features: Parses the entire pay

Jan 4, 2023

Periodically collect data about my Twitter account and check in to github to preserve an audit trail.

Twitter audit trail backup This repository backs up my follower list, following list, blocked accounts list and muted accounts list periodically using

Dec 28, 2022

Easily manage your github credentials

Easily manage your github credentials

HUB ADMIN Hub Admin is a command-line tool managing your github credentials Installation go get github.com/crewdevio/HubAdmin How to use Open he

Oct 20, 2021

A Github action to post to news.ycombinator.com

action-hackernews-post Unofficial A Github action to post to news.ycombinator.com Uses @lukakerr's hkn go module to login and post to HN Guidelines As

Mar 12, 2022
Comments
  • Using the code with merge to master events.

    Using the code with merge to master events.

    Hello,

    First thanks for your code snippet, it is really useful.

    I was wondering how to make it work also with push events on master after merging a pull request, replacing the header section with

    on:
       push:
          branches: master
    

    then in the changedfile action I tried to replace these variables with

    github.event.pull_request.base.sha
    -> github.event.push.base.sha
    

    but when merging to master it does not detect the folder changes.

    Any idea how to make it work ?

actionlint is a static checker for GitHub Actions workflow files.

actionlint actionlint is a static checker for GitHub Actions workflow files. Features: Syntax check for workflow files to check unexpected or missing

Dec 27, 2022
Explores GitHub Actions in Go Lab from GopherCon 2021

Gopher A Tweet An action that tweets. Gopher A Tweet was created based on GopherCon 2021s Gophers of Microsoft: GitHub Action in Go Lab to explore bui

Dec 10, 2021
Golang-action - A template repository for writing custom GitHub Actions in Golang

Golang Action A template repository for writing custom GitHub Actions in Golang.

Feb 12, 2022
A demo repo to show KICS Github Action in Action

?? KICS GitHub Actions Demo This repository shows how KICS GitHub Action can be set and was fully inspired by the documentation on KICS GitHub Actions

Nov 23, 2021
Package githubv4 is a client library for accessing GitHub GraphQL API v4 (https://developer.github.com/v4/).

githubv4 Package githubv4 is a client library for accessing GitHub GraphQL API v4 (https://docs.github.com/en/graphql). If you're looking for a client

Dec 26, 2022
May 25, 2021
A GitHub CLI extension that displays collaboration-related information about a GitHub repository.
A GitHub CLI extension that displays collaboration-related information about a GitHub repository.

collab-scanner GitHub CLI extension A GitHub CLI extension that displays collaboration-related information on a repository. Install gh extension insta

Dec 30, 2022
This project is mostly a fancy wrapper around the Extract Table (github) API

Knockout-City-Stat-Scanner Credits This project is mostly a fancy wrapper around the Extract Table (github) API, they did all the heavy lifting here a

Jan 30, 2022
A decentralized vinyl marketplace demo built with Go, Cosmos SDK and Starport

emusicchain emusicchain is a blockchain built using Cosmos SDK and Tendermint and created with Starport. Get started starport chain serve serve comma

Dec 5, 2021
Testing ground for build-your-own golang/grpc demo app.

Getting started Prereqs You will need to install both Go and the protoc compiler (version 3): Go installation protoc installation Install the protobuf

Dec 15, 2021