-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[skip ci] Deploy from chat and let argocd update status
- Loading branch information
Showing
4 changed files
with
108 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: branch-deploy | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
# Permissions needed for reacting and adding comments for IssueOps commands | ||
permissions: | ||
pull-requests: write | ||
deployments: write | ||
contents: write | ||
checks: read | ||
|
||
jobs: | ||
deploy: | ||
name: deploy | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.issue.pull_request }} # only run on pull request comments | ||
|
||
steps: | ||
# The branch-deploy Action | ||
- name: branch-deploy | ||
id: branch-deploy | ||
uses: github/[email protected] | ||
|
||
# If the branch-deploy Action was triggered, checkout our branch | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ steps.branch-deploy.outputs.ref }} | ||
|
||
# If the branch-deploy Action was triggered, run the deployment (i.e. '.deploy') | ||
- name: deploy | ||
if: ${{ steps.branch-deploy.outputs.continue == 'true' && steps.branch-deploy.outputs.noop != 'true' }} | ||
run: echo ${{ steps.branch-deploy.outputs.ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
name: Repository Dispatch | ||
on: | ||
repository_dispatch: | ||
types: [argocd] | ||
|
||
# permissions: | ||
# pull-requests: write | ||
# deployments: write | ||
# contents: write | ||
# checks: read | ||
|
||
jobs: | ||
deployment-started: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo ${{ github.event.client_payload }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{{- if .Values.pr.enabled }} | ||
--- | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: sync-hook | ||
annotations: | ||
argocd.argoproj.io/hook: Sync | ||
# argocd.argoproj.io/hook: PostSync | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: curl | ||
image: curlimages/curl:latest | ||
env: | ||
- name: GITHUB_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: github-token | ||
key: token | ||
command: | ||
- "curl" | ||
args: | ||
- -L | ||
- -XPOST | ||
- -H | ||
- "Accept: application/vnd.github+json" | ||
- -H | ||
- "Authorization: Bearer $GITHUB_TOKEN" | ||
- -H | ||
- "X-GitHub-Api-Version: 2022-11-28" | ||
- https://api.github.com/repos/bierteam/drinkn/dispatches | ||
- -d | ||
- | | ||
{ | ||
"event_type": "argocd", | ||
"client_payload": { | ||
"passed": false, | ||
"message": "Error: timeout" | ||
} | ||
} | ||
restartPolicy: Never | ||
backoffLimit: 0 | ||
--- | ||
apiVersion: bitnami.com/v1alpha1 | ||
kind: SealedSecret | ||
metadata: | ||
annotations: | ||
argocd.argoproj.io/hook: PreSync | ||
sealedsecrets.bitnami.com/cluster-wide: "true" | ||
a8r.io/description: Expires on Wed, Aug 7 2024. https://github.com/settings/tokens?type=beta | ||
name: github-token | ||
spec: | ||
encryptedData: | ||
token: AgASRow85Bv/IGZTftJ5BdtnqMejgyJMNiU7z5fwJkVYZFQoc5RTYchVK5a5y4tLpT256waDcOncWavGgTsXybNo5uPUukUNE21NsCiq/Po9RtG/NYmVmJ0VeNJSVES5JYB0MPU9SsKBli1mAUWQW7gP+cVeTZCyu5Ii9SGoKOxPRMNl+8U58WAy1pYfWNimU6WA2S83VXV9IUYOqGwKfiI4Jx7na0BihiZBbMnDWXIXM+aJQ4YJoZBJ0/TtsKABJK/ictxRSdzxjzDKNTgvTBX4Vh5Nx6lTkB2++5MHqjKF+/LnuL/KawVTZhJOVw7GRxr7AW6Wuyph3l2RENwBx27IKbrPZsdKWnmS4CswpwYh0jp0pnIrs8fgPGMu+/EPP+B+Xnvd3EkLsllXQBpXKFTswF5lzQPifj+oTwi6/6m91RgsnL9hCTHlt6tEuuwB6ge9CpiRpkc0Pqki/m0JhRjR+SNbv2XhlHaXRCMnzlnbc0cyVLwM73f6/UQ7A7eyIQ3EqFwuE1x76982gi9vFAMwqUWlgIlKBe9rt+mpvBXaawvkveCTnoaJ7VgncDnl/FlmDwFGmpX6locIBNvBL3xHSC5eKZ8t6ZyfhhkEXgDPw8GA8RHX9Sute6DAXrVux+lbQ4WphEcYWwPASx0KSLz2J2pxck6OdfQERQ0zekLWF/z1lBy6aMCgMMi24bEpIE2YKCuSHk33/oRQn32LRTIsiqnPsrQk071EMOVrcgPybFsjScFpOpx9YAN9ba58glBwuohXktAbdZ24ro3wZa1K1aqWZZ2/NqwSszg8PmZxX7mSRXFkqwHV3IRZpB4= | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,3 @@ fqdn: pils.oscarr.nl | |
pr: | ||
enabled: false | ||
number: 9999 | ||
|