Skip to content

Commit 07d3cf7

Browse files
committed
Update gh workflow
1 parent b321e85 commit 07d3cf7

File tree

1 file changed

+50
-8
lines changed

1 file changed

+50
-8
lines changed

.github/workflows/create_release.yml

Lines changed: 50 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,53 @@ name: Create release
33
on: workflow_dispatch
44

55
jobs:
6-
build:
7-
uses: klever-io/workflow-calls/.github/workflows/docker.yaml@master
8-
with:
9-
flavor: "golang"
10-
use_default_dockerfiles: false
11-
secrets:
12-
gcp_project_id: ${{ secrets.GCP_PROJECT_ID }}
13-
gcp_cloud_run_sa: ${{ secrets.GCP_CLOUD_RUN_SA }}
6+
CI:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout code
10+
uses: actions/checkout@v5.0.0
11+
- name: Docker Login
12+
uses: docker/login-action@v3.5.0
13+
with:
14+
username: ${{ secrets.DOCKER_REGISTRY_USER }}
15+
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
16+
- name: Docker image build and push
17+
uses: docker/build-push-action@v6.18.0
18+
with:
19+
context: ./app/src
20+
file: ./app/src/Dockerfile
21+
push: true
22+
tags: |
23+
kleverapp/klv-bridge:${{ github.sha }}
24+
kleverapp/klv-bridge:latest
25+
CD:
26+
runs-on: ubuntu-latest
27+
environment: ${{ github.ref_name }}
28+
needs:
29+
- CI
30+
steps:
31+
- name: Checkout code
32+
uses: actions/checkout@v5.0.0
33+
34+
- name: Twingate Setup
35+
uses: twingate/github-action@V1.1
36+
with:
37+
service-key: ${{ secrets.TWINGATE_SERVICE_ACCOUNT }}
38+
39+
- name: Set up Python
40+
uses: actions/setup-python@v4
41+
with:
42+
python-version: '3.11'
43+
44+
- name: Install AWX CLI
45+
run: |
46+
python -m pip install --upgrade pip
47+
pip install awxkit
48+
49+
- name: Launch template on AWX
50+
run: |
51+
export TOWER_HOST="${{ vars.AWX_HOST }}"
52+
export TOWER_USERNAME="${{ vars.AWX_USER }}"
53+
export TOWER_PASSWORD="${{ secrets.AWX_PASS }}"
54+
LOGIN_OUTPUT=$(awx login)
55+
awx job_templates launch "${{ vars.AWX_TEMPLATE_NAME }}" --extra_vars '{"vm_name":"${{ vars.ENV_NETWORK }}","docker_image_tag":"kleverapp/klv-bridge:${{ github.sha }}"}' --job_tags update

0 commit comments

Comments
 (0)