Skip to content

Commit dc6e364

Browse files
committed
Adds CD job
1 parent 903476b commit dc6e364

2 files changed

Lines changed: 19 additions & 4 deletions

File tree

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88
- main
99

1010
jobs:
11-
docker:
12-
runs-on: self-hosted
11+
ci:
12+
runs-on: ubuntu-latest
1313
steps:
1414
-
1515
name: Shorten commit id
@@ -27,4 +27,19 @@ jobs:
2727
uses: docker/build-push-action@v6
2828
with:
2929
push: true
30-
tags: tyrelfecha/python-app:${{ env.COMMIT_ID }}
30+
tags: tyrelfecha/python-app:${{ env.COMMIT_ID }}
31+
32+
cd:
33+
needs: ci
34+
runs-on: self-hosted
35+
steps:
36+
-
37+
name: Argocd app sync
38+
shell: bash
39+
run: |
40+
argocd login argocd-server.argocd \
41+
--insecure \
42+
--grpc-web \
43+
--username admin \
44+
--password ${{ secrets.ARGOCD_PASSWORD }}
45+
argocd app sync python-app

src/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def details():
1010
return jsonify({
1111
'time': datetime.datetime.now().strftime("%I:%M:%S%p on %B %d, %Y"),
1212
'hostname': socket.gethostname(),
13-
'message': 'You are doing great, human!!'
13+
'message': 'You are doing great, human!! :)'
1414
})
1515

1616
@app.route('/api/v1/healthz')

0 commit comments

Comments
 (0)