-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (80 loc) · 2.89 KB
/
Copy pathauto-test-deploy.yml
File metadata and controls
93 lines (80 loc) · 2.89 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
name: Build and Deploy to Ralphina Server
on:
workflow_dispatch:
push:
tags:
- "auto-testing-deploy"
jobs:
shai-hulud-detector:
runs-on: ubuntu-latest
steps:
- name: Checkout seb-server-gui repo
uses: actions/checkout@v6.0.2
with:
path: seb
clean: false
- name: Checkout Cobenian/shai-hulud-detect
uses: actions/checkout@v6.0.2
with:
repository: Cobenian/shai-hulud-detect
path: hulud
clean: false
- # Pipeline will automatically fail on exit codes 1 or 2
name: Security Scan with Shai-Hulud Detector
run: |
chmod +x ./hulud/shai-hulud-detector.sh
./hulud/shai-hulud-detector.sh ./seb
build-and-push-admin-auto-test:
runs-on: ubuntu-latest
strategy:
matrix:
tag_suffix: ["", "-single-host"]
include:
- tag_suffix: ""
path_name: ""
- tag_suffix: "-single-host"
path_name: "/seb-server-gui"
steps:
- name: Set env for dynamic tag
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
run: echo "TAG_NAME=${GITHUB_REF#refs/*/}${{ matrix.tag_suffix }}" >> $GITHUB_ENV
- name: Set env manual
if: github.event_name == 'workflow_dispatch'
run: echo "TAG_NAME=default_version${{ matrix.tag_suffix }}" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v6.0.2
- name: Login to DockerHub
uses: docker/login-action@v4.1.0
with:
username: ${{ secrets.DOCKERHUB_ADMIN_USERNAME }}
password: ${{ secrets.DOCKERHUB_ADMIN_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v7.1.0
with:
context: .
push: true
tags: docker.io/${{ secrets.DOCKERHUB_ADMIN_USERNAME }}/seb-server-gui-auto-testing:${{ env.TAG_NAME }}
build-and-push-e2e-runner:
runs-on: ubuntu-latest
needs: build-and-push-admin-auto-test
steps:
- name: Set env for dynamic tag
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
run: echo "TAG_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set env manual
if: github.event_name == 'workflow_dispatch'
run: echo "TAG_NAME=default_version" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v6.0.2
- name: Login to DockerHub
uses: docker/login-action@v4.1.0
with:
username: ${{ secrets.DOCKERHUB_ADMIN_USERNAME }}
password: ${{ secrets.DOCKERHUB_ADMIN_TOKEN }}
- name: Build and push E2E runner image
uses: docker/build-push-action@v7.1.0
with:
context: .
file: ./client/Dockerfile.e2e
push: true
tags: docker.io/${{ secrets.DOCKERHUB_ADMIN_USERNAME }}/seb-server-gui-e2e-runner:${{ env.TAG_NAME }}