Skip to content

Commit 2229be6

Browse files
committed
Merge branches 'kubernetes' and 'deployment'
2 parents 645f663 + 9968ebb commit 2229be6

File tree

11 files changed

+211
-1
lines changed

11 files changed

+211
-1
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ indent_size = 4
77
trim_trailing_whitespace = true
88
insert_final_newline = true
99

10-
[*.yaml]
10+
[*.yml]
1111
indent_size = 2

.github/workflows/main.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Main
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
schedule:
10+
- cron: '0 0 * * 6'
11+
12+
workflow_dispatch:
13+
14+
jobs:
15+
main:
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
config:
20+
- name: 'macos'
21+
image: 'macos-12'
22+
- name: 'linux'
23+
image: 'ubuntu-22.04'
24+
- name: 'windows'
25+
image: 'windows-2022'
26+
27+
name: main.${{ matrix.config.name }}
28+
runs-on: ${{ matrix.config.image }}
29+
30+
# noinspection SpellCheckingInspection
31+
env:
32+
DOTNET_NOLOGO: 1
33+
DOTNET_CLI_TELEMETRY_OPTOUT: 1
34+
NUGET_PACKAGES: ${{ github.workspace }}/.github/nuget-packages
35+
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v3
39+
40+
- name: NuGet cache
41+
uses: actions/cache@v3
42+
with:
43+
path: ${{ env.NUGET_PACKAGES }}
44+
key: ${{ runner.os }}.nuget.${{ hashFiles('**/*.fsproj') }}
45+
46+
- name: Set up .NET SDK
47+
uses: actions/setup-dotnet@v3
48+
with:
49+
dotnet-version: '8.0.x'
50+
51+
- name: Build
52+
run: dotnet build
53+
54+
- name: Test
55+
run: dotnet run --project ctor -- verify

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
/.idea/
2+
3+
bin/
4+
obj/
5+
6+
*.private.json

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "Fabricator"]
2+
path = Fabricator
3+
url = [email protected]:ForNeVeR/Fabricator.git

Codingteam.Devops.sln

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31903.59
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Codingteam.Ctor", "ctor\Codingteam.Ctor.fsproj", "{E08EC4D8-5FD7-45CB-B48A-689005546B10}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A37A2B6B-F09B-4105-8AA5-47BA5D74B68A}"
9+
ProjectSection(SolutionItems) = preProject
10+
.gitignore = .gitignore
11+
.editorconfig = .editorconfig
12+
EndProjectSection
13+
EndProject
14+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{C4672A21-FB21-4BBF-A0A1-512AC1B66C9A}"
15+
EndProject
16+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{67164D20-A669-4BC3-A40E-751D3045BA89}"
17+
ProjectSection(SolutionItems) = preProject
18+
.github\workflows\main.yml = .github\workflows\main.yml
19+
EndProjectSection
20+
EndProject
21+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fabricator.Console", "Fabricator\Fabricator.Console\Fabricator.Console.fsproj", "{0157906C-006C-45F8-A79A-0D55F16B16B2}"
22+
EndProject
23+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Fabricator", "Fabricator", "{853E359A-18C5-4472-A712-D5C80EE99D6B}"
24+
EndProject
25+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fabricator.Core", "Fabricator\Fabricator.Core\Fabricator.Core.fsproj", "{C57439E9-20AF-4EEB-8C91-5D74D346374B}"
26+
EndProject
27+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fabricator.Resources", "Fabricator\Fabricator.Resources\Fabricator.Resources.fsproj", "{414C5063-3201-43AC-9DA1-B18A18802C0D}"
28+
EndProject
29+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Fabricator.Templates", "Fabricator\Fabricator.Templates\Fabricator.Templates.fsproj", "{E4F7858D-B0F7-4B42-928F-02688E843566}"
30+
EndProject
31+
Global
32+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
33+
Debug|Any CPU = Debug|Any CPU
34+
Release|Any CPU = Release|Any CPU
35+
EndGlobalSection
36+
GlobalSection(SolutionProperties) = preSolution
37+
HideSolutionNode = FALSE
38+
EndGlobalSection
39+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
40+
{E08EC4D8-5FD7-45CB-B48A-689005546B10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
41+
{E08EC4D8-5FD7-45CB-B48A-689005546B10}.Debug|Any CPU.Build.0 = Debug|Any CPU
42+
{E08EC4D8-5FD7-45CB-B48A-689005546B10}.Release|Any CPU.ActiveCfg = Release|Any CPU
43+
{E08EC4D8-5FD7-45CB-B48A-689005546B10}.Release|Any CPU.Build.0 = Release|Any CPU
44+
{0157906C-006C-45F8-A79A-0D55F16B16B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
45+
{0157906C-006C-45F8-A79A-0D55F16B16B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
46+
{0157906C-006C-45F8-A79A-0D55F16B16B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
47+
{0157906C-006C-45F8-A79A-0D55F16B16B2}.Release|Any CPU.Build.0 = Release|Any CPU
48+
{C57439E9-20AF-4EEB-8C91-5D74D346374B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
49+
{C57439E9-20AF-4EEB-8C91-5D74D346374B}.Debug|Any CPU.Build.0 = Debug|Any CPU
50+
{C57439E9-20AF-4EEB-8C91-5D74D346374B}.Release|Any CPU.ActiveCfg = Release|Any CPU
51+
{C57439E9-20AF-4EEB-8C91-5D74D346374B}.Release|Any CPU.Build.0 = Release|Any CPU
52+
{414C5063-3201-43AC-9DA1-B18A18802C0D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
53+
{414C5063-3201-43AC-9DA1-B18A18802C0D}.Debug|Any CPU.Build.0 = Debug|Any CPU
54+
{414C5063-3201-43AC-9DA1-B18A18802C0D}.Release|Any CPU.ActiveCfg = Release|Any CPU
55+
{414C5063-3201-43AC-9DA1-B18A18802C0D}.Release|Any CPU.Build.0 = Release|Any CPU
56+
{E4F7858D-B0F7-4B42-928F-02688E843566}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
57+
{E4F7858D-B0F7-4B42-928F-02688E843566}.Debug|Any CPU.Build.0 = Debug|Any CPU
58+
{E4F7858D-B0F7-4B42-928F-02688E843566}.Release|Any CPU.ActiveCfg = Release|Any CPU
59+
{E4F7858D-B0F7-4B42-928F-02688E843566}.Release|Any CPU.Build.0 = Release|Any CPU
60+
EndGlobalSection
61+
GlobalSection(NestedProjects) = preSolution
62+
{67164D20-A669-4BC3-A40E-751D3045BA89} = {C4672A21-FB21-4BBF-A0A1-512AC1B66C9A}
63+
{0157906C-006C-45F8-A79A-0D55F16B16B2} = {853E359A-18C5-4472-A712-D5C80EE99D6B}
64+
{C57439E9-20AF-4EEB-8C91-5D74D346374B} = {853E359A-18C5-4472-A712-D5C80EE99D6B}
65+
{414C5063-3201-43AC-9DA1-B18A18802C0D} = {853E359A-18C5-4472-A712-D5C80EE99D6B}
66+
{E4F7858D-B0F7-4B42-928F-02688E843566} = {853E359A-18C5-4472-A712-D5C80EE99D6B}
67+
EndGlobalSection
68+
EndGlobal

Codingteam.Devops.sln.DotSettings

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
2+
<s:Boolean x:Key="/Default/UserDictionary/Words/=appsettings/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

Fabricator

Submodule Fabricator added at b5b64d1

ctor/Codingteam.Ctor.fsproj

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net8.0</TargetFramework>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<Compile Include="GreenCaptchaBot.fs" />
10+
<Compile Include="Program.fs" />
11+
<Content Include="GreenCaptchaBot.template.json" />
12+
</ItemGroup>
13+
14+
<ItemGroup>
15+
<ProjectReference Include="..\Fabricator\Fabricator.Console\Fabricator.Console.fsproj" />
16+
<ProjectReference Include="..\Fabricator\Fabricator.Resources\Fabricator.Resources.fsproj" />
17+
<ProjectReference Include="..\Fabricator\Fabricator.Templates\Fabricator.Templates.fsproj" />
18+
</ItemGroup>
19+
20+
</Project>

ctor/GreenCaptchaBot.fs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
module internal Codingteam.Ctor.GreenCaptchaBot
2+
3+
open Fabricator.Core
4+
open Fabricator.Resources.Files
5+
open Fabricator.Resources.Docker
6+
open Fabricator.Templates.FileTemplates
7+
8+
let private hostConfigDirectory = "/opt/green-captcha-bot/"
9+
let private docker =
10+
let version = "v1.15.1"
11+
dockerContainer {
12+
Sources = {
13+
GitRepository = "https://github.com/ImoutoChan/GreenCaptchaBot.git"
14+
GitReference = $"tags/{version}"
15+
}
16+
DockerfilePath = "CaptchaBot/Dockerfile"
17+
Tag = version
18+
Name = "green-captcha-bot"
19+
Options = [|
20+
Volume(hostPath = hostConfigDirectory, containerPath = "/app/Configuration")
21+
|]
22+
}
23+
24+
let private configFile parameters = FileResource(
25+
templatedFile "GreenCaptchaBot.template.json" parameters,
26+
$"{hostConfigDirectory}/appsettings.json"
27+
)
28+
29+
let resources(parameters: Map<string, string>): IResource[] = [| configFile parameters; docker |]

ctor/GreenCaptchaBot.template.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"Configuration": {
3+
"BotToken": "$BOT_TOKEN",
4+
"DeleteJoinMessages": "Unsuccessful"
5+
}
6+
}

0 commit comments

Comments
 (0)