-
Notifications
You must be signed in to change notification settings - Fork 4
106 lines (94 loc) · 3.1 KB
/
ingress.yaml
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
105
106
name: ingress
permissions:
contents: read
on:
push:
branches: [ ingress ]
workflow_dispatch:
inputs:
script_version:
description: 'script version, only support 1.9 or 0.49'
required: true
default: '1.9'
branch:
description: 'branch or tag name, should compatibe with SCRIPT_VERSION'
required: true
default: 'release-1.9'
env:
PROJECT: ingress-nginx
BRANCH: gmssl # release-1.9 or nginx-0.49.3-es, SCRIPT_VERSION must comtible
SCRIPT_VERSION: 0.49 #1.9 or 0.49
REGISTRY_NAME: "docker.io"
REGISTRY_USER: "${{ secrets.DOCKER_HUB_USER }}"
REGISTRY_PASS: "${{ secrets.DOCKER_HUB_PASSWORD }}"
jobs:
build:
name: Build x86
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Login to Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY_NAME }}
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASS }}
- name: Setting
run: |
set -x
if ${{ github.event_name == 'workflow_dispatch' }} ; then
echo "BRANCH=${{ github.event.inputs.branch }}" >> $GITHUB_ENV
echo "SCRIPT_VERSION=${{ github.event.inputs.script_version }}" >> $GITHUB_ENV
fi
echo "trigger by ${{ github.event_name }}"
echo "BRANCH is ${{ env.BRANCH }}"
echo "SCRIPT_VERSION is ${{ env.SCRIPT_VERSION }}"
- name: Check out build code
uses: actions/checkout@v4
with:
repository: easystack/${{ env.PROJECT }}
ref: ${{ env.BRANCH }}
token: ${{ secrets.KPULL }}
path: ${{ env.PROJECT }}
- name: Image Build And Push
uses: ./.github/actions/ingress
with:
REGISTRY_NAME: ${{ env.REGISTRY_NAME }}
PROJECT: ${{ env.PROJECT }}
SCRIPT_VERSION: ${{ env.SCRIPT_VERSION }}
build-arm64:
name: Build arm64
runs-on: [self-hosted, linux, arm64]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Login to Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY_NAME }}
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASS }}
- name: Setting
run: |
set -x
if ${{ github.event_name == 'workflow_dispatch' }} ; then
echo "BRANCH=${{ github.event.inputs.branch }}" >> $GITHUB_ENV
echo "SCRIPT_VERSION=${{ github.event.inputs.script_version }}" >> $GITHUB_ENV
fi
echo "trigger by ${{ github.event_name }}"
echo "BRANCH is ${{ env.BRANCH }}"
echo "SCRIPT_VERSION is ${{ env.SCRIPT_VERSION }}"
- name: Check out build code
uses: actions/checkout@v4
with:
repository: easystack/${{ env.PROJECT }}
ref: ${{ env.BRANCH }}
token: ${{ secrets.KPULL }}
path: ${{ env.PROJECT }}
- name: Image Build And Push
uses: ./.github/actions/ingress
with:
REGISTRY_NAME: ${{ env.REGISTRY_NAME }}
PROJECT: ${{ env.PROJECT }}
SCRIPT_VERSION: ${{ env.SCRIPT_VERSION }}