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

CODE RUB: Updated the build script #110

Merged
merged 1 commit into from
May 21, 2024
Merged
Show file tree
Hide file tree
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
8 changes: 7 additions & 1 deletion .github/workflows/dotnet.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: .Net
name: Build
on:
push:
branches:
Expand Down Expand Up @@ -35,6 +35,7 @@ jobs:
with:
github-token: ${{ secrets.PAT_FOR_TAGGING }}
script: >2+

const prefixes = [
'INFRA:',
'PROVISIONS:',
Expand Down Expand Up @@ -67,8 +68,13 @@ jobs:
'DESIGN:',
'BUSINESS:'
];


const title = context.payload.pull_request.title;

const existingLabels = context.payload.pull_request.labels.map(label => label.name);


for (const prefix of prefixes) {
if (title.startsWith(prefix)) {
const label = prefix.slice(0, -1);
Expand Down
4 changes: 2 additions & 2 deletions ADotNet.Infrastructure.Build/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static void Main(string[] args)

var githubPipeline = new GithubPipeline
{
Name = ".Net",
Name = "Build",

OnEvents = new Events
{
Expand Down Expand Up @@ -110,7 +110,7 @@ static void Main(string[] args)
}
};

string buildScriptPath = "../../../../.github/workflows/dotnet.yml";
string buildScriptPath = "../../../../.github/workflows/build.yml";
string directoryPath = Path.GetDirectoryName(buildScriptPath);

if (!Directory.Exists(directoryPath))
Expand Down
Loading