Skip to content

Create test workflow to test deployment annotation before merging #12

Create test workflow to test deployment annotation before merging

Create test workflow to test deployment annotation before merging #12

name: Deploy Canary Clusters
on:
workflow_dispatch:
push:
branches:
- setup-annotation-for-cluster-deployments
jobs:
deploy:
name: Deploy the canary clusters
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Annotation Variables
run: |
echo "CURR_DATE_TIME=$(date +%s)000000000" >> $GITHUB_ENV
echo "RELEASE_VERSION=v0.17" >> $GITHUB_ENV
echo "CLUSTER_NAME=CANARY_GOERLI_1" >> $GITHUB_ENV
- name: Post Annotation to Loki
uses: fjogeleit/http-request-action@v1
with:
url: ${{ secrets.LOKI_URL }}
method: 'POST'
customHeaders: '{"Content-Type": "application/json"}'
username: ${{ secrets.LOKI_USERNAME }}
password: ${{ secrets.LOKI_PASSWORD }}
data: >
{
"streams": [
{
"stream": {
"charon_deployment_event": "CLUSTER_NAME",
"release_version": "v0.17"
},
"values": [
[
"'${{ env.CURR_DATE_TIME }}'}}'",
"Deployed Charon version '${{ env.RELEASE_VERSION }}'}}' to '${{ env.CLUSTER_NAME }}'}}'"
]
]
}
]
}