mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 13:46:00 +00:00
73 lines
2.2 KiB
YAML
73 lines
2.2 KiB
YAML
# --------------------------------------------------------------------------------------------
|
|
# This file is generated. Do not edit manually
|
|
# --------------------------------------------------------------------------------------------
|
|
name: Cloud images PREMIUM
|
|
'on':
|
|
push:
|
|
tags:
|
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
|
- 'v[0-9]+.[0-9]+.[0-9]+-packer-beta.[0-9]+'
|
|
jobs:
|
|
build:
|
|
runs-on: '${{ matrix.os }}'
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- ubuntu-22.04
|
|
steps:
|
|
- name: Context
|
|
env:
|
|
GITHUB_CONTEXT: '${{ toJson(github) }}'
|
|
run: echo "$GITHUB_CONTEXT"
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 1
|
|
- name: Use Node.js 18.x
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 18.x
|
|
- name: Install jq
|
|
run: |
|
|
sudo apt-get install jq -y
|
|
- name: Setup `packer`
|
|
uses: hashicorp/setup-packer@main
|
|
with:
|
|
version: latest
|
|
- name: Checkout dbgate/dbgate-pro
|
|
uses: actions/checkout@v2
|
|
with:
|
|
repository: dbgate/dbgate-pro
|
|
token: '${{ secrets.GH_TOKEN }}'
|
|
path: dbgate-pro
|
|
ref: 6831f881877927e152b84b9acbaee6c8cfe53efe
|
|
- name: Merge dbgate/dbgate-pro
|
|
run: |
|
|
mkdir ../dbgate-pro
|
|
mv dbgate-pro/* ../dbgate-pro/
|
|
cd ..
|
|
mkdir dbgate-merged
|
|
cd dbgate-pro
|
|
cd sync
|
|
yarn
|
|
node sync.js --nowatch
|
|
cd ..
|
|
- name: adjustPackageJson
|
|
run: |
|
|
cd ..
|
|
cd dbgate-merged
|
|
node adjustPackageJson --premium
|
|
- name: Run `packer init` for Azure
|
|
run: |
|
|
cd ../dbgate-merged/packer
|
|
packer init ./azure-ubuntu.pkr.hcl
|
|
- name: Delete old Azure VMs
|
|
run: |
|
|
cd ../dbgate-merged/packer
|
|
chmod +x delete-old-azure-images.sh
|
|
./delete-old-azure-images.sh
|
|
env:
|
|
AZURE_CLIENT_ID: '${{secrets.AZURE_CLIENT_ID}}'
|
|
AZURE_CLIENT_SECRET: '${{secrets.AZURE_CLIENT_SECRET}}'
|
|
AZURE_TENANT_ID: '${{secrets.AZURE_TENANT_ID}}'
|
|
AZURE_SUBSCRIPTION_ID: '${{secrets.AZURE_SUBSCRIPTION_ID}}'
|