-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix curl command to keep Grafana Cloud instance active
- Loading branch information
Showing
1 changed file
with
3 additions
and
11 deletions.
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 |
---|---|---|
|
@@ -9,18 +9,10 @@ jobs: | |
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set environment variables from .env | ||
uses: xom9ikk/[email protected] | ||
- name: Setup go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- name: Send log to Grafana Cloud | ||
run: > | ||
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $TEST_GRAFANA_CLOUD_STACK_IDENTIFIER:$TEST_GRAFANA_CLOUD_TOKEN" -d '{"streams": [{"stream": {"Language": "Curl", "source": "GitHub Actions"},"values": [["'"$(($(date +%s)*1000000000))"'", "Keeping this Grafana instance alive!"]]}]}' https://logs-prod-006.grafana.net/loki/api/v1/push | ||
env: | ||
TEST_GRAFANA_CLOUD_STACK_IDENTIFIER: ${{ secrets.TEST_GRAFANA_CLOUD_STACK_IDENTIFIER }} | ||
TEST_GRAFANA_CLOUD_TOKEN: ${{ secrets.TEST_GRAFANA_CLOUD_TOKEN }} | ||
run: | | ||
curl --fail-with-body -X POST -H "Content-Type: application/json" -H "Authorization: Bearer ${{ secrets.TEST_GRAFANA_CLOUD_STACK_LOGS_USER_ID }}:${{ secrets.TEST_GRAFANA_CLOUD_TOKEN }}" -d '{"streams": [{"stream": {"Language": "Curl", "source": "GitHub Actions"},"values": [["'"$(($(date +%s)*1000000000))"'", "Keeping this Grafana instance alive!"]]}]}' https://logs-prod-006.grafana.net/loki/api/v1/push | ||
workflow-keepalive: | ||
if: github.event_name == 'schedule' | ||
runs-on: ubuntu-latest | ||
|