diff --git a/.github/workflows/PR-to-staging.yml b/.github/workflows/PR-to-staging.yml index 06e355c..fb2fc52 100644 --- a/.github/workflows/PR-to-staging.yml +++ b/.github/workflows/PR-to-staging.yml @@ -1,6 +1,6 @@ name: PR to staging -on: +on: push: paths: - 'live/android-config/android-config.json' diff --git a/.github/workflows/ios-PR-to-staging.yml b/.github/workflows/ios-PR-to-staging.yml index e4beb68..ec5a8fb 100644 --- a/.github/workflows/ios-PR-to-staging.yml +++ b/.github/workflows/ios-PR-to-staging.yml @@ -1,6 +1,6 @@ name: PR to staging -on: +on: push: paths: - 'live/ios-config/ios-config.json' diff --git a/.github/workflows/ios-build-and-publish.yml b/.github/workflows/ios-build-and-publish.yml index e149f52..0974811 100644 --- a/.github/workflows/ios-build-and-publish.yml +++ b/.github/workflows/ios-build-and-publish.yml @@ -6,6 +6,7 @@ on: - main paths: - 'live/ios-config/ios-config.json' + workflow_dispatch: jobs: publish: diff --git a/.github/workflows/macos-PR-to-staging.yml b/.github/workflows/macos-PR-to-staging.yml new file mode 100644 index 0000000..b52c2fc --- /dev/null +++ b/.github/workflows/macos-PR-to-staging.yml @@ -0,0 +1,32 @@ +name: PR to staging (macOS) + +on: + push: + paths: + - 'live/macos-config/macos-config.json' + pull_request: + types: + - opened + paths: + - 'live/macos-config/macos-config.json' + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: jakejarvis/s3-sync-action@7ed8b112447abb09f1da74f3466e4194fc7a6311 + if: github.event_name == 'push' + 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/macos-config' + DEST_DIR: 'remotemessaging/config/staging' + - uses: github-actions-up-and-running/pr-comment@f1f8ab2bf00dce6880a369ce08758a60c61d6c0b + if: github.event.action == 'opened' + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + message: 'Your PR is hosted at https://staticcdn.duckduckgo.com/remotemessaging/config/staging/macos-config.json' diff --git a/.github/workflows/macos-build-and-publish.yml b/.github/workflows/macos-build-and-publish.yml new file mode 100644 index 0000000..531f3cd --- /dev/null +++ b/.github/workflows/macos-build-and-publish.yml @@ -0,0 +1,24 @@ +name: Build and Publish (macOS) + +on: + push: + branches: + - main + paths: + - 'live/macos-config/macos-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/macos-config' + DEST_DIR: 'remotemessaging/config/v1' diff --git a/.github/workflows/windows-PR-to-staging.yml b/.github/workflows/windows-PR-to-staging.yml new file mode 100644 index 0000000..28df737 --- /dev/null +++ b/.github/workflows/windows-PR-to-staging.yml @@ -0,0 +1,32 @@ +name: PR to staging (Windows) + +on: + push: + paths: + - 'live/windows-config/windows-config.json' + pull_request: + types: + - opened + paths: + - 'live/windows-config/windows-config.json' + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: jakejarvis/s3-sync-action@7ed8b112447abb09f1da74f3466e4194fc7a6311 + if: github.event_name == 'push' + 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/staging' + - uses: github-actions-up-and-running/pr-comment@f1f8ab2bf00dce6880a369ce08758a60c61d6c0b + if: github.event.action == 'opened' + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + message: 'Your PR is hosted at https://staticcdn.duckduckgo.com/remotemessaging/config/staging/windows-config.json' diff --git a/.github/workflows/windows-build-and-publish.yml b/.github/workflows/windows-build-and-publish.yml new file mode 100644 index 0000000..84a077e --- /dev/null +++ b/.github/workflows/windows-build-and-publish.yml @@ -0,0 +1,24 @@ +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' diff --git a/live/macos-config/macos-config.json b/live/macos-config/macos-config.json new file mode 100644 index 0000000..b489163 --- /dev/null +++ b/live/macos-config/macos-config.json @@ -0,0 +1,5 @@ +{ + "version": 0, + "messages": [], + "rules": [] +} \ No newline at end of file diff --git a/live/windows-config/windows-config.json b/live/windows-config/windows-config.json new file mode 100644 index 0000000..b489163 --- /dev/null +++ b/live/windows-config/windows-config.json @@ -0,0 +1,5 @@ +{ + "version": 0, + "messages": [], + "rules": [] +} \ No newline at end of file