Skip to content

Remove messages added because bing incident (#208) #39

Remove messages added because bing incident (#208)

Remove messages added because bing incident (#208) #39

name: Build and Publish (Windows)
on:
push:
branches:
- main
paths:
- 'live/windows-config/windows-config.json'
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: jakejarvis/s3-sync-action@7ed8b112447abb09f1da74f3466e4194fc7a6311
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SOURCE_DIR: 'live/windows-config'
DEST_DIR: 'remotemessaging/config/v1'
- name: Extract Version from JSON
id: extract_version
run: |
VERSION=$(jq -r '.version' live/windows-config/windows-config.json)
echo "Extracted Version: $VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Trigger Network Request
id: trigger_request
run: |
RESPONSE=$(curl -fLSs -o /dev/null -w "%{http_code}" "https://improving.duckduckgo.com/t/m_new_rmf_config_windows?version=${VERSION}")
echo "HTTP_RESPONSE=$RESPONSE" >> $GITHUB_ENV
- name: Check Response Status
run: |
if [[ "$HTTP_RESPONSE" -ge 200 && "$HTTP_RESPONSE" -lt 300 ]]; then
echo "Successful: Version ${VERSION} was processed."
else
echo "HTTP Error $HTTP_RESPONSE for version ${VERSION}"
exit 1
fi