Skip to content

Commit 6213c24

Browse files
committed
feat: adding github dotnet docker action post
1 parent a758ea6 commit 6213c24

File tree

1 file changed

+63
-0
lines changed
  • content/post/github-action-dotnet-docker-action

1 file changed

+63
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
+++
2+
title = "Create a dotnet Docker action for GitHub Actions"
3+
date = 2024-04-26T15:38:30+08:00
4+
header_img = ""
5+
toc = false
6+
tags = ["GitHub", "Hugo", "GitHub Pages"]
7+
categories = ["GitHub"]
8+
# series = ["Themes Guide"]
9+
+++
10+
11+
Recently I had to solve a more complex problem for a customer. When I encounter more complex problems in my daily work that can't be solved with a few Bash or Powershell commands, I use my favourite language C# and the dotnet framework. I am a big fan of the dotnet framework and have worked with it for most of my IT career. Situations like this also help me to familiarise myself with the latest developments and to get to know the new stuff and try out new functions.
12+
13+
In this particular case, a GitHub Actions workflow has to be created, which makes various API queries and processes the data further. As part of my work as an accredited GitHub trainer, I am familiar with the three types of GitHub Actions and so this time the choice fell on a Docker Action based on dotnet. But where is the best place to start, how to pass parameters and how to provide values as outputs? With the help of Google, I came across the following guide, which was a good starting point, but too overloaded for me:
14+
15+
https://learn.microsoft.com/en-us/dotnet/devops/create-dotnet-github-action
16+
17+
However, I wanted to have a basic & lean template on GitHub that provides me with the basic framework for a GitHub dotnet Docker Action and can serve as a basis for later tasks. Open source, of course, and therefore usable for everyone else.
18+
19+
No sooner said than done. The repository contains:
20+
21+
- a [action.yml](https://github.com/spindev/dotnet-docker-action/blob/main/action.yml) file for the definition of the GitHub Action
22+
- the [dotnet Docker Action project](https://github.com/spindev/dotnet-docker-action/tree/main/DotNet.DockerAction)
23+
- a [Dockerfile](https://github.com/spindev/dotnet-docker-action/blob/main/Dockerfile) to dockerize the dotnet project
24+
- a [testing workflow](https://github.com/spindev/dotnet-docker-action/blob/main/.github/workflows/test.yml), because we are always following the DevOps principles, right?
25+
26+
You can find the template for a GitHub dotnet Docker Action here:
27+
28+
https://github.com/spindev/dotnet-docker-action
29+
30+
Simply use the green button ‘Use this template’ and create your own GitHub dotnet Docker Action. Have fun with it. If you are missing something, feel free to create a pull request.
31+
32+
+++
33+
title = "Creating a GitHub .NET Docker action template"
34+
date = 2024-04-26T15:38:30+08:00
35+
header_img = ""
36+
toc = false
37+
tags = ["GitHub", "GitHub Actions", ".NET", "Docker"]
38+
categories = ["GitHub"]
39+
40+
# series = ["Themes Guide"]
41+
42+
+++
43+
44+
Recently I had to solve a more complex problem for a customer. When I encounter more complex problems in my daily work that can't be solved with a few Bash or Powershell commands, I use my favourite language C# and the .NET framework. I am a big fan of the .NET framework and have worked with it for most of my IT career. Situations like this also help me to familiarise myself with the latest developments and to get to know the new stuff and try out new functions.
45+
46+
In this particular case, a GitHub Actions workflow has to be created, which makes various API queries and processes the data further. As part of my work as an accredited GitHub Trainer, I am familiar with the three types of GitHub Actions and so this time the choice fell on a Docker Action based on .NET. But where is the best place to start, how to pass parameters and how to provide values as outputs? With the help of Google, I came across the following guide, which was a good starting point, but too overloaded for me:
47+
48+
https://learn.microsoft.com/en-us/dotnet/devops/create-dotnet-github-action
49+
50+
However, I wanted to have a basic & lean template on GitHub that provides me with the required stuff for a GitHub .NET Docker Action and can serve as a basis for later tasks. Open source, of course, and therefore usable for everyone else.
51+
52+
No sooner said than done. The repository contains:
53+
54+
- a [action.yml](https://github.com/spindev/dotnet-docker-action/blob/main/action.yml) file for the definition of the GitHub Action
55+
- the [.NET Docker Action project](https://github.com/spindev/dotnet-docker-action/tree/main/DotNet.DockerAction)
56+
- a [Dockerfile](https://github.com/spindev/dotnet-docker-action/blob/main/Dockerfile) to dockerize the .NET project
57+
- a [testing workflow](https://github.com/spindev/dotnet-docker-action/blob/main/.github/workflows/test.yml), because we are always following the DevOps principles, right?
58+
59+
You can find the template for a GitHub .NET Docker Action here:
60+
61+
https://github.com/spindev/dotnet-docker-action
62+
63+
Simply use the green button ‘Use this template’ and create your own GitHub .NET Docker Action. Have fun with it. If you are missing something, feel free to create a pull request.

0 commit comments

Comments
 (0)