Skip to content

Commit 2cb1b21

Browse files
committed
Added change that triggers this workflow for every pull request
1 parent 0406932 commit 2cb1b21

File tree

1 file changed

+39
-7
lines changed

1 file changed

+39
-7
lines changed
Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,50 @@
1-
name: Trigger Webhook
1+
name: Run A2Q Tests
22

33
on:
44
push:
55
branches:
66
- '**'
77

88
jobs:
9-
trigger-webhook:
9+
run-docker_1:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
# Step 1: Trigger the webhook using curl
14-
- name: Trigger Webhook
13+
# Step 1: Check out the repository
14+
- name: Checkout Repository
15+
uses: actions/checkout@v3
16+
17+
# Step 2: Log in to Docker Hub
18+
- name: Log in to Docker Hub
19+
uses: docker/login-action@v2
20+
with:
21+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
22+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
23+
24+
# Step 3: Pull the Docker image
25+
- name: Pull Docker Image
26+
run: docker pull mbolla651/a2qtest:latest
27+
28+
# Step 4: Run the Docker container
29+
- name: Run Docker Container
30+
env:
31+
ACCOUNT_ID: ${{ secrets.A2Q_ACCOUNT_ID }}
32+
API_KEY: ${{ secrets.A2Q_API_KEY }}
33+
LICENSE_KEY: ${{ secrets.A2Q_LICENSE_KEY }}
1534
run: |
16-
curl -X POST https://motels-appeared-allied-premium.trycloudflare.com/trigger \
17-
-H "Content-Type: application/json" \
18-
-d '{"key": "value"}'
35+
for file in $(find ./test/a2q -type f -name "*.yml"); do
36+
echo "Processing file: $file"
37+
docker run -v ./test/a2q:/a2q --rm mbolla651/a2qtest:latest \
38+
--json \
39+
--public \
40+
definition.location.file=/a2q/$(basename $file) \
41+
definition.var.accountId=$ACCOUNT_ID \
42+
definition.var.nrEnv=US \
43+
definition.var.sutEnvironment=US \
44+
definition.var.display_name_previous=madhu-newrelic-agent-1.63.0 \
45+
definition.var.display_name_current=madhu-newrelic-agent-1.63.1 \
46+
definition.secret.apiKey=$API_KEY \
47+
result.newrelic.accountId=$ACCOUNT_ID \
48+
result.newrelic.licenseKey=$LICENSE_KEY \
49+
result.newrelic.env=US
50+
done

0 commit comments

Comments
 (0)