-
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (55 loc) · 1.97 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_USE_POLLING_FILE_WATCHER: true
NUGET_XMLDOC_MODE: skip
CONFIGURATION: Release
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- windows-2022
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
- name: Restore NuGet
run: dotnet restore
- name: Build Solution
run: dotnet build --configuration ${{ env.CONFIGURATION }} --no-restore
- name: Test Solution
run: dotnet test --configuration ${{ env.CONFIGURATION }} --no-restore --no-build
- name: Setup Workflow
run: |
git config --global user.email "[email protected]"
git config --global user.name "Andre Hofmeister"
echo "${{ github.WORKSPACE }}/src/Accelerate/bin/${{ env.CONFIGURATION }}/net6.0/" >> $GITHUB_PATH
- name: Test Workflow
run: |
workflow_git_dir="HofmeisterAn/GitHub/_git/testcontainers-dotnet-docker-compose/"
workflow_git_commit_msg="feat: Add demo.txt"
Accelerate init --name ${{ github.RUN_ID }}
cd ${{ github.RUN_ID }}
echo "[{\"type\":\"Accelerate.Repositories.AzureDevOps\",\"repo\":{\"url\":\"https://[email protected]/$workflow_git_dir\"}}]" > repos.json
Accelerate clone
Accelerate foreach "echo $(date) > demo.txt"
Accelerate foreach "git add ."
Accelerate commit --message "$workflow_git_commit_msg"
last_commit_msg=$(git --git-dir "work/$workflow_git_dir.git" log -1 --pretty=%B)
if [ "$workflow_git_commit_msg" == "$last_commit_msg" ]; then exit 0; else exit 1; fi