-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (99 loc) · 2.59 KB
/
cicd.yml
File metadata and controls
104 lines (99 loc) · 2.59 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: CICD
on:
push:
branches:
- main
pull_request:
release:
types:
- published
workflow_dispatch:
permissions: read-all
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
ci:
name: CI
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v6
with:
lfs: true
fetch-depth: 0
- name: Set up Docker with containerd
uses: docker/setup-docker-action@v5
with:
daemon-config: |
{
"features": {
"containerd-snapshotter": true
}
}
- name: 'Install InvokeBuild Module'
shell: pwsh
run: Install-Module -Name InvokeBuild -Force
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: 'Restore'
shell: pwsh
run: .\restore.ps1 -Instance ${{github.run_id}}
- name: 'Format'
shell: pwsh
run: .\format.ps1 -Instance ${{github.run_id}}
- name: 'Version'
shell: pwsh
run: .\version.ps1 -Instance ${{github.run_id}}
- name: 'Build'
shell: pwsh
run: .\build.ps1 -Instance ${{github.run_id}}
- name: 'Test'
shell: pwsh
run: .\test.ps1 -Instance ${{github.run_id}}
- name: 'Pack'
shell: pwsh
run: .\pack.ps1 -Instance ${{github.run_id}}
- name: 'Publish Artefacts'
uses: actions/upload-artifact@v7.0.1
with:
name: .trash
path: '.trash'
include-hidden-files: true
cd:
name: CD
needs: ci
if: github.event_name == 'release'
environment:
name: 'DockerHub'
url: https://hub.docker.com/r/tiksn/fossa-ui
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v6
with:
lfs: true
fetch-depth: 0
- name: 'Download Artefact'
uses: actions/download-artifact@v8.0.1
with:
name: '.trash'
path: './.trash'
- name: Set up Docker with containerd
uses: docker/setup-docker-action@v5
with:
daemon-config: |
{
"features": {
"containerd-snapshotter": true
}
}
- name: 'Install InvokeBuild Module'
shell: pwsh
run: Install-Module -Name InvokeBuild -Force
- name: 'Publish'
env:
DOCKER_ACCESS_TOKEN: ${{secrets.DOCKER_ACCESS_TOKEN}}
shell: pwsh
run: .\publish.ps1 -Instance ${{github.run_id}}