Skip to content

Commit

Permalink
Merge pull request #131 from The-Standard-Organization/users/cjdutoit…
Browse files Browse the repository at this point in the history
…/minorfoundations-requireissueortask

MINOR FOUNDATIONS:  Updated YAML scripts to exclude linter tasks for Push Events
  • Loading branch information
cjdutoit authored Jan 8, 2025
2 parents a9326ed + 0ade07b commit b39d43c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out
Expand All @@ -28,6 +29,7 @@ jobs:
- name: Test
run: dotnet test --no-build --verbosity normal
add_tag:
name: Add Tag and Create Release
runs-on: ubuntu-latest
needs:
- build
Expand Down Expand Up @@ -109,6 +111,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.PAT_FOR_TAGGING }}
publish:
name: Publish to NuGet
runs-on: ubuntu-latest
needs:
- add_tag
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/prLinter.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
name: PR Linter
on:
push:
branches:
- main
pull_request:
types:
- opened
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public void GenerateBuildScript(string branchName, string projectName, string do
"build",
new Job
{
Name = "Build",
RunsOn = BuildMachines.UbuntuLatest,

Steps = new List<GithubTask>
Expand Down Expand Up @@ -87,6 +88,9 @@ public void GenerateBuildScript(string branchName, string projectName, string do
projectRelativePath: "ADotNet/ADotNet.csproj",
githubToken: "${{ secrets.PAT_FOR_TAGGING }}",
branchName: branchName)
{
Name = "Add Tag and Create Release"
}
},
{
"publish",
Expand All @@ -95,6 +99,9 @@ public void GenerateBuildScript(string branchName, string projectName, string do
dependsOn: "add_tag",
dotNetVersion: dotNetVersion,
nugetApiKey: "${{ secrets.NUGET_ACCESS }}")
{
Name = "Publish to NuGet"
}
}
}
};
Expand All @@ -120,8 +127,6 @@ public void GeneratePrLintScript(string branchName)

OnEvents = new Events
{
Push = new PushEvent { Branches = [branchName] },

PullRequest = new PullRequestEvent
{
Types = ["opened", "edited", "synchronize", "reopened", "closed"],
Expand Down
3 changes: 2 additions & 1 deletion ADotNet/Models/Pipelines/GithubPipelines/DotNets/Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ namespace ADotNet.Models.Pipelines.GithubPipelines.DotNets
{
public class Events
{
[YamlMember(DefaultValuesHandling = DefaultValuesHandling.OmitDefaults)]
public PushEvent Push { get; set; }

[YamlMember(Alias = "pull_request")]
[YamlMember(Alias = "pull_request", DefaultValuesHandling = DefaultValuesHandling.OmitDefaults)]
public PullRequestEvent PullRequest { get; set; }
}
}

0 comments on commit b39d43c

Please sign in to comment.