This file contains 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
To run your own TypeScript GitHub Action inside your workflow, follow these steps: | |
1. Create a GitHub Action: In your repository, create a new directory (e.g., .github/actions/my-action) to store the TypeScript action's files. Inside this directory, create the following files: | |
action.yml: This file defines the action's inputs, outputs, and main entry point. | |
index.ts: This is the main TypeScript file that contains your action's logic. | |
package.json: This file defines the action's dependencies and other metadata. | |
2. Add the action's metadata: Edit the action.yml file and define the action's metadata as shown below: | |
YAML: |
This file contains 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
var serviceBusConnection = Configuration.GetConnectionString("ServiceBusConnectionString"); | |
services.AddAzureClients(builder => { builder.AddServiceBusClient(serviceBusConnection); }); |
This file contains 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
{ | |
"@type": "MessageCard", | |
"@context": "http://schema.org/extensions", | |
"themeColor": "0076D7", | |
"summary": "New message", | |
"sections": [{ | |
"activityTitle": "New message", | |
"activitySubtitle": "New message subtitle", | |
"activityImage": "https://somewebsite.com/image.png", | |
"facts": [{ |
This file contains 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
using System.Collections.Generic; | |
using System.Text.Json.Serialization; | |
namespace MicrosoftTeamsNotification.Models | |
{ | |
public class Fact | |
{ | |
public string Name { get; set; } | |
public string Value { get; set; } | |
} |
This file contains 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
using MicrosoftTeamsNotification.Models; | |
using System; | |
using System.Net.Http; | |
using System.Text; | |
using System.Text.Json; | |
using System.Threading.Tasks; | |
namespace MicrosoftTeamsNotification.Tasks | |
{ | |
public static class MessageClient |
This file contains 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
namespace MicrosoftTeamsNotification; | |
public class ProcessMessage | |
{ | |
[FunctionName("ProcessMessage")] | |
public async Task Run([ServiceBusTrigger("testqueue", Connection = "ServiceBusConnection")] string myQueueItem, ILogger log) | |
{ | |
try | |
{ | |
var message = JsonConvert.DeserializeObject<MessageToProcess>(myQueueItem); |
This file contains 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
using Azure.Messaging.ServiceBus; | |
using Newtonsoft.Json; | |
namespace WriteMessageToServiceBus; | |
public class SendServiceBusMessage | |
{ | |
private readonly ServiceBusClient _serviceBusClient; | |
public SendServiceBusMessage(ServiceBusClient serviceBusClient) |
This file contains 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
Add-Type @" | |
using System.Net; | |
using System.Security.Cryptography.X509Certificates; | |
public class TrustAllCertsPolicy : ICertificatePolicy { | |
public bool CheckValidationResult( | |
ServicePoint srvPoint, X509Certificate certificate, | |
WebRequest request, int certificateProblem) { | |
return true; | |
} | |
} |
This file contains 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
gulp.task("Export-Unicorn-Files", function () { | |
var destination = config.unicornExportFolder; | |
var root = "./src"; | |
var roots = [root]; | |
var files = "/**/serialization/**/*.yml"; | |
return gulp.src(roots, { base: root }).pipe( | |
foreach(function (stream, file) { | |
console.log("Exporting from " + file.path); | |
gulp.src(file.path + files, { base: file.path }) | |
.pipe(newer(destination)) |
This file contains 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
<div id="ItemIdPlaceholder" class="BlogPostArea" onclick="scForm.getParentForm().postRequest('','','','LaunchTypePlaceholder(url=ItemIdPlaceholder)'); return false;" style="margin-left:0px;"> | |
<div class="BlogPostViews"> | |
<a class="ceebox imgcontainer" title="" href="#" onclick="scForm.getParentForm().postRequest('','','','LaunchTypePlaceholder(url=ItemIdPlaceholder)'); return false;"> | |
<img onerror="this.onerror=null;this.src='/temp/iconcache/office/48x48/user.png';" src="ImagePathDynamicPlaceholder" class="attachment-post-thumbnail wp-post-image" alt="FirstNameDynamicPlaceholder LastNameDynamicPlaceholder" title="FirstNameDynamicPlaceholder LastNameDynamicPlaceholder"> | |
</a> | |
</div> | |
<h5 class="BlogPostHeader"> | |
<a href="javascript:void(0);" onclick="scForm.browser.clearEvent(event || window.event, true);scForm.getParentForm().postRequest('','','','LaunchTypePlaceholder(url=ItemIdPlaceholder)'); return false;">FirstNameDynamicPlaceholder LastNameDynamicPlaceholder</a> | |
</h5> | |
<div class="BlogPos |
NewerOlder