-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
122 additions
and
46 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: test | ||
on: | ||
push: | ||
branches: [main] | ||
jobs: | ||
build: | ||
if: ${{ startsWith(github.ref, 'refs/heads/deployment/') || github.ref == 'refs/heads/main' }} | ||
runs-on: [self-hosted] | ||
steps: | ||
- name: chceck code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Get version | ||
id: version | ||
run: | | ||
if [[ -n "$GITHUB_REF" && "$GITHUB_REF" == "refs/tags/"* ]]; then | ||
echo "tag version" | ||
echo "::set-output name=version::${GITHUB_REF/refs\/tags\//}" | ||
else | ||
echo "commit version" | ||
echo "::set-output name=version::${{ github.sha }}" | ||
fi | ||
- name: Build and push | ||
run: | | ||
docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }} | ||
docker build -t gitdatateam/pando-network:${{ steps.version.outputs.version }} . | ||
docker push gitdatateam/pando-network:${{ steps.version.outputs.version }} | ||
docker tag gitdatateam/pando-network:${{ steps.version.outputs.version }} gitdatateam/pando-network:latest | ||
docker push gitdatateam/pando-network:latest | ||
- name: Deploy | ||
uses: WyriHaximus/github-action-helm3@v3 | ||
with: | ||
exec: helm upgrade pando-network --install ./chart --namespace website --set-string tag=latest | ||
kubeconfig: ${{ secrets.KUBECONTENT }} | ||
overrule_existing_kubeconfig: "true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v2 | ||
name: pando-network | ||
description: Install pando.network to provide pando official web page. | ||
version: 1.0.0 | ||
kubeVersion: < 1.28.0-0 | ||
home: https://pando.network/ | ||
keywords: | ||
- pando-network | ||
sources: | ||
- https://github.com/pando-project/pando-web | ||
maintainers: | ||
- name: pando team |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: pando-network-deployment | ||
labels: | ||
apptype: pando-network | ||
spec: | ||
replicas: {{ .Values.replicas}} | ||
selector: | ||
matchLabels: | ||
app: pando-network | ||
template: | ||
metadata: | ||
labels: | ||
app: pando-network | ||
apptype: pando-network | ||
date: "{{ now | unixEpoch }}" | ||
spec: | ||
containers: | ||
- name: pando-network | ||
image: gitdatateam/pando-network:{{ .Values.tag }} | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: pando-network | ||
annotations: | ||
meta.helm.sh/release-name: pando-network | ||
nginx.ingress.kubernetes.io/rewrite-target: / | ||
nginx.ingress.kubernetes.io/proxy-connect-timeout: "30" | ||
nginx.ingress.kubernetes.io/proxy-read-timeout: "1800" | ||
nginx.ingress.kubernetes.io/proxy-send-timeout: "1800" | ||
labels: | ||
apptype: pando-network | ||
app.kubernetes.io/managed-by: Helm | ||
heritage: Helm | ||
release: pando-network | ||
spec: | ||
ingressClassName: {{.Values.ingress_name}} | ||
rules: | ||
- host: pando-network | ||
http: | ||
paths: | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: pando-network-service | ||
port: | ||
number: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: pando-network-service | ||
labels: | ||
apptype: pando-network | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
app: pando-network | ||
ports: | ||
- protocol: TCP | ||
port: 80 | ||
targetPort: 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Additional Trusted CAs. | ||
# Enable this flag and add your CA certs as a secret named tls-ca-additional in the namespace. | ||
# See README.md for details. | ||
replicas: 1 | ||
ingress_name: nginx | ||
tag: latest |