generated from kubernetes101/pib-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 1 KB
/
gitops.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Secure-Build
on:
workflow_dispatch:
push:
jobs:
gitops:
runs-on: ubuntu-latest
steps:
- name: Git Config
run: |
git config --global user.email "pib-gitops@outlook.com"
git config --global user.name "pib-gitops"
- name: Checkout Repo
uses: actions/checkout@v2
- name: Docker Pull
# todo: update goa version after stable release
run: docker pull ghcr.io/cse-labs/pib-gitops-automation:latest
- name: GitOps Automation
# todo: update goa version after stable release
run: |
docker run --rm \
-v $PWD:/goa/fleet \
-v $PWD:/goa/control \
ghcr.io/cse-labs/pib-gitops-automation:latest \
--github-token ${{ secrets.GITHUB_TOKEN }}
- name: Commit GitOps changes
run: |
if [ -n "$(git status --porcelain)" ]; then
git pull
git add .
git commit -m "GitOps Secure Build"
git push
else
echo "No changes found"
fi