Update .gitea/workflows/docker-build-and-push.yaml
This commit is contained in:
parent
af59783877
commit
e7d305c0e8
@ -27,12 +27,6 @@ jobs:
|
|||||||
image: catthehacker/ubuntu:act-22.04
|
image: catthehacker/ubuntu:act-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Import Secrets
|
- name: Import Secrets
|
||||||
uses: hashicorp/vault-action@v2
|
uses: hashicorp/vault-action@v2
|
||||||
@ -42,6 +36,14 @@ jobs:
|
|||||||
secrets: |
|
secrets: |
|
||||||
cicd/data/docker password | REGISTRY_PASSWORD ;
|
cicd/data/docker password | REGISTRY_PASSWORD ;
|
||||||
cicd/data/docker username | REGISTRY_USERNAME ;
|
cicd/data/docker username | REGISTRY_USERNAME ;
|
||||||
|
cicd/data/submodule token | SUBMODULE_TOKEN ;
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
fetch-depth: 0
|
||||||
|
token: ${{ env.SUBMODULE_TOKEN }}
|
||||||
|
|
||||||
- name: Set up Docker BuildX
|
- name: Set up Docker BuildX
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
@ -42,6 +42,18 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
description: Kubeconf secret path in vault for prod
|
description: Kubeconf secret path in vault for prod
|
||||||
|
HELM_VERSION:
|
||||||
|
type: string
|
||||||
|
default: 3.17
|
||||||
|
description: Last stable with our chart's
|
||||||
|
ENABLE_CUSTOM_SET:
|
||||||
|
type: string
|
||||||
|
default: false
|
||||||
|
description: Last stable with our chart's
|
||||||
|
CUSTOM_HELM_SET:
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
description: Last stable with our chart's
|
||||||
secrets:
|
secrets:
|
||||||
VAULT_TOKEN:
|
VAULT_TOKEN:
|
||||||
required: true
|
required: true
|
||||||
@ -90,17 +102,25 @@ jobs:
|
|||||||
- name: Install helm
|
- name: Install helm
|
||||||
uses: azure/setup-helm@v4.2.0
|
uses: azure/setup-helm@v4.2.0
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: ${{ inputs.HELM_VERSION }}
|
||||||
|
|
||||||
- name: Set up Kubectl
|
- name: Set up Kubectl
|
||||||
uses: azure/k8s-set-context@v4
|
uses: azure/k8s-set-context@v4
|
||||||
with:
|
with:
|
||||||
kubeconfig: ${{ env.KUBECONFIG }}
|
kubeconfig: ${{ env.KUBECONFIG }}
|
||||||
|
|
||||||
|
- name: Set EXTRA_ARGS if ENABLE_CUSTOM_SET is true
|
||||||
|
run: |
|
||||||
|
if [ "${{ inputs.ENABLE_CUSTOM_SET }}" = "true" ] && [ -n "${{ inputs.CUSTOM_HELM_SET }}" ]; then
|
||||||
|
echo "EXTRA_ARGS=${{ inputs.CUSTOM_HELM_SET }}" >> "$GITHUB_ENV"
|
||||||
|
else
|
||||||
|
echo "EXTRA_ARGS=" >> "$GITHUB_ENV"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Install chart
|
- name: Install chart
|
||||||
run: |
|
run: |
|
||||||
helm upgrade --install --cleanup-on-fail --atomic --timeout 2m --wait ${{ inputs.APP_NAME }} ./chart \
|
helm upgrade --install --cleanup-on-fail --atomic --timeout 2m --wait ${{ inputs.APP_NAME }} ./chart \
|
||||||
--namespace ${{ env.NAMESPACE }} \
|
--namespace ${{ env.NAMESPACE }} \
|
||||||
--set image.repository=${{ inputs.REGISTRY }}/${{ inputs.REGISTRY_USER }}/${{ inputs.APP_NAME }} \
|
--set image.repository=${{ inputs.REGISTRY }}/${{ inputs.REGISTRY_USER }}/${{ inputs.APP_NAME }} \
|
||||||
--set image.tag=${{ env.VERSION }} \
|
--set image.tag=${{ env.VERSION }} \
|
||||||
-f ${{ env.VALUES_FILE }}
|
-f ${{ env.VALUES_FILE }} $EXTRA_ARGS
|
@ -22,8 +22,20 @@ jobs:
|
|||||||
image: catthehacker/ubuntu:act-22.04
|
image: catthehacker/ubuntu:act-22.04
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout repo
|
- name: Import Common Secrets
|
||||||
uses: actions/checkout@v3
|
uses: hashicorp/vault-action@v2
|
||||||
|
with:
|
||||||
|
url: https://vault.project-quest-dev.com
|
||||||
|
token: ${{ secrets.VAULT_TOKEN }}
|
||||||
|
secrets: |
|
||||||
|
cicd/data/submodule token | SUBMODULE_TOKEN ;
|
||||||
|
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
fetch-depth: 0
|
||||||
|
token: ${{ env.SUBMODULE_TOKEN }}
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user