Skip to content

Create test workflow to test deployment annotation before merging #6

Create test workflow to test deployment annotation before merging

Create test workflow to test deployment annotation before merging #6

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)" >> $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": {
"label": "{version=${{ env.RELEASE_VERSION }}, Cluster_name=${{ env.CLUSTER_NAME }}}"
},
"values": [
[
"Deployed Charon version ${{ env.RELEASE_VERSION }} to ${{ env.CLUSTER_NAME }}"
]
]
}
]
}