Re-add deployment as a regular directory
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
name: Release Charts
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: [self-hosted, Linux, X64]
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config user.name "$GITHUB_ACTOR"
|
||||
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
||||
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@v3
|
||||
with:
|
||||
version: v3.14.0
|
||||
|
||||
# https://github.com/helm/chart-releaser-action/issues/74
|
||||
- name: Add repositories
|
||||
run: |
|
||||
for dir in $(ls -d charts/*/); do
|
||||
helm dependency list $dir 2> /dev/null | tail +2 | head -n -1 | awk '{ print "helm repo add " $1 " " $3 }' | while read cmd; do $cmd; done
|
||||
done
|
||||
|
||||
- name: Run chart-releaser
|
||||
uses: helm/chart-releaser-action@v1.6.0
|
||||
env:
|
||||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
with:
|
||||
charts_dir: charts
|
||||
skip_existing: true
|
||||
@@ -0,0 +1,46 @@
|
||||
name: Test setup script
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'docker-compose/**'
|
||||
- '.github/workflows/test.yml'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test setup script
|
||||
runs-on: [self-hosted, Linux]
|
||||
steps:
|
||||
- name: Login to GitHub container registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Create working directory
|
||||
run: mkdir temp
|
||||
- name: Run setup script
|
||||
env:
|
||||
DEFGUARD_DOMAIN: "id.localhost"
|
||||
DEFGUARD_ENROLLMENT_DOMAIN: "enrollment.localhost"
|
||||
DEFGUARD_VPN_NAME: "test_location"
|
||||
DEFGUARD_VPN_IP: "10.0.60.1/24"
|
||||
DEFGUARD_VPN_GATEWAY_IP: "10.20.20.40"
|
||||
DEFGUARD_VPN_GATEWAY_PORT: "50050"
|
||||
CORE_IMAGE_TAG: latest
|
||||
PROXY_IMAGE_TAG: latest
|
||||
GATEWAY_IMAGE_TAG: latest
|
||||
working-directory: temp
|
||||
run: curl --proto '=https' --tlsv1.2 -sSf -L https://raw.githubusercontent.com/DefGuard/deployment/main/docker-compose/setup.sh | bash -s - --non-interactive
|
||||
- name: Sleep for 10 seconds
|
||||
working-directory: temp
|
||||
run: sleep 10s
|
||||
- name: Test defguard is available
|
||||
working-directory: temp
|
||||
run: curl -f http://id.localhost/api/v1/health
|
||||
- name: Stop compose stack
|
||||
if: always()
|
||||
working-directory: temp
|
||||
run: docker-compose down
|
||||
Reference in New Issue
Block a user