Skip to content

Commit

Permalink
💚 send PR when K8s manifests are updated
Browse files Browse the repository at this point in the history
Signed-off-by: Rintaro Okamura <[email protected]>
  • Loading branch information
rinx committed Jun 3, 2020
1 parent 23604e5 commit 29cf54b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/helm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ jobs:
helm version
- name: Update k8s-dir
run: |
TIMESTAMP=$(date +%Y%m%d_%H%M%S_%3N)
BRANCH_NAME="documentation/k8s-manifests/update_k8s_manifests_${TIMESTAMP}"
git checkout master
git checkout -b ${BRANCH_NAME}
make k8s/manifest/update
make k8s/manifest/helm-operator/update
- name: Run formatter and license.go
Expand All @@ -51,10 +55,19 @@ jobs:
git commit --signoff -m ":robot: Automatically update k8s manifests"
git remote set-url origin "https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git push origin master
git push origin ${BRANCH_NAME}
curl --include --verbose --fail \
-H "Accept: application/json" \
-H "Content-Type:application/json" \
-H "Authorization: token ${GITHUB_TOKEN}" \
--request POST \
--data "{\"title\": \"Update K8s manifests\", \"head\": \"${BRANCH_NAME}\", \"base\": \"master\", \"body\": \"K8s manifests are updated.\", \"maintainer_can_modify\": true}" \
$API_URL
env:
GITHUB_USER: ${{ secrets.DISPATCH_USER }}
GITHUB_TOKEN: ${{ secrets.DISPATCH_TOKEN }}
API_URL: https://api.github.com/repos/vdaas/vald/pulls
update-helm-chart:
name: Update Helm chart
runs-on: ubuntu-latest
Expand Down

0 comments on commit 29cf54b

Please sign in to comment.