Skip to content

write-values

write-values #27

Workflow file for this run

name: Write values.yaml
on:
repository_dispatch:
types: [write-values]
jobs:
write_values_file:
runs-on: ubuntu-latest
concurrency:
group: app-pipeline-group-${{ github.event.client_payload.appName }}
cancel-in-progress: false
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Create Directory
run: mkdir -p ./pipelines/${{ github.event.client_payload.appName }}
- name: Write values.yaml file
run: |
cat <<EOF > ./pipelines/${{ github.event.client_payload.appName }}/values.yaml
appName: ${{ github.event.client_payload.appName }}
git: ${{ github.event.client_payload.git }}
branch: ${{ github.event.client_payload.branch }}
port: ${{ github.event.client_payload.port }}
primaryHostname: ${{ github.event.client_payload.primaryHostname }}
EOF
- name: Commit and push changes
run: |
git config user.name "in-jun"
git config user.email "[email protected]"
git add .
git commit -m "Update values.yaml for ${{ github.event.client_payload.appName }}"
git push
- name: Trigger Generate GoCD Pipelines
run: |
curl -X POST \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
-d '{"event_type": "generate-pipelines"}' \
https://api.github.com/repos/injunweb/gitops-repo/dispatches