Skip to content

Changed to use github run number over randomly generated value #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/testNginxForAzureDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
- name: 'Update config - single file'
shell: bash
run: |
echo "RANDOM=$((RANDOM%10))" >> $GITHUB_ENV
sed -i 's/000000/'"${{ env.RANDOM }}"'/g' test/configs/single/nginx.conf
sed -i 's/000000/'"$GITHUB_RUN_NUMBER"'/g' test/configs/single/nginx.conf
cat test/configs/single/nginx.conf
- name: 'Sync NGINX configuration to NGINX on Azure instance - single file'
uses: nginxinc/nginx-for-azure-deploy-action@v0
with:
Expand All @@ -45,11 +45,12 @@ jobs:
- name: 'Validate config update - single file'
shell: bash
run: |
wget -O - -o /dev/null http://${{ secrets.NGINX_DEPLOYMENT_IP }} | jq '.request.headers."Github-Run-Id" | test( "'"${{ env.RANDOM }}"'")'
wget -O - -o /dev/null http://${{ secrets.NGINX_DEPLOYMENT_IP }} | jq '.request.headers."Github-Run-Id" | test( "'"$GITHUB_RUN_NUMBER"'")'
- name: 'Update config - multi file'
shell: bash
run: |
sed -i 's/000000/'"$GITHUB_RUN_ID"'/g' test/configs/multi/conf.d/proxy.conf
cat test/configs/multi/conf.d/proxy.conf
- name: 'Sync NGINX configuration to NGINX on Azure instance - multi file'
uses: nginxinc/nginx-for-azure-deploy-action@v0
with:
Expand Down