forked from m9sweeper/m9sweeper
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (77 loc) · 2.5 KB
/
main.yaml
File metadata and controls
85 lines (77 loc) · 2.5 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
name: Main Workflow
on:
pull_request:
branches:
- 'main'
types:
- 'opened'
- 'synchronize'
push:
branches:
- 'main'
tags-ignore:
- '*'
paths:
- 'dash/**'
- 'selenium-testing/**'
- 'trawler/**'
- 'Dockerfile'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
versioning:
name: Determine Image Versioning
runs-on: self-hosted
outputs:
dash-image-version: ${{ steps.dash_versioning.outputs.version }}
dash-image-tags: ${{ steps.dash_versioning.outputs.tags }}
trawler-image-version: ${{ steps.trawler_versioning.outputs.version }}
trawler-image-tags: ${{ steps.trawler_versioning.outputs.tags }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Dash Versioning
id: dash_versioning
uses: docker/metadata-action@v4
with:
images: ghcr.io/m9sweeper/dash
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
- name: Trawler Versioning
id: trawler_versioning
uses: docker/metadata-action@v4
with:
images: ghcr.io/m9sweeper/trawler
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
- name: Cleanup Work Directory
uses: AutoModality/action-clean@v1
if: always()
build_images:
name: Build Docker Images
uses: ./.github/workflows/docker-build.yaml
needs: versioning
permissions:
packages: write
with:
dash-image-tags: ${{ needs.versioning.outputs.dash-image-tags }}
trawler-image-tags: ${{ needs.versioning.outputs.trawler-image-tags }}
push-images: ${{ github.event_name != 'pull_request' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork != true) }}
selenium_testing:
name: Run Selenium Tests
uses: ./.github/workflows/selenium-test.yaml
needs: versioning
permissions:
checks: write
with:
kubernetes-version: 'v1.27.4'
gatekeeper-version: '3.13.0'
helm-version: 'v3.12.0'
dash-image-version: ${{ needs.versioning.outputs.dash-image-version }}
trawler-image-version: ${{ needs.versioning.outputs.trawler-image-version }}
load-image-from-artifact: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true }}