Skip to content

Commit

Permalink
update gitops repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Raajheer1 committed Jun 25, 2024
1 parent 03d96d5 commit 3f95bf1
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions .github/workflows/generate-configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Generate ConfigMap
name: Generate and Update ConfigMap

on: [push]

jobs:
Expand All @@ -14,8 +15,26 @@ jobs:
run: go build -o bin/generator ./generator/generator.go
- name: Generate ConfigMap
run: ./bin/generator
# Commit all changed files back to the repository
- uses: stefanzweifel/git-auto-commit-action@v4
id: auto_commit

# Checkout the Target Repository
- name: Checkout GitOps Repository
uses: actions/checkout@v4
with:
branch: main
repository: 'VATUSA/gitops'
path: gitops # Choose a suitable directory name
token: ${{ secrets.G_TOKEN }}

# Update the ConfigMap (Adapt paths as needed)
- name: Update ConfigMap
run: |
cp manifest/configmap.yaml gitops/current/discord-bot-v3/configmap.yaml
# Commit and Push to the Target Repository
- name: Commit and Push Changes
run: |
cd gitops # Move into the checked out repository
git config --global user.email "[email protected]"
git config --global user.name "VATUSA6"
git add current/discord-bot-v3/configmap.yaml
git commit -m "Update configmap.yaml from generator"
git push origin main

0 comments on commit 3f95bf1

Please sign in to comment.