Skip to content
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

Add Mobile Server Side config #53

Merged
merged 2 commits into from
Jun 7, 2024
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
66 changes: 66 additions & 0 deletions .github/workflows/mobile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: "[Mobile] Google Chats PR Announcer"

on:
workflow_dispatch:
schedule:
# 9am Wednesdays
- cron: "0 9 * * WED"

jobs:
# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-defining-outputs-for-a-job
setup:
runs-on: ubuntu-latest
outputs:
repos: ${{ steps.main.outputs.repos }}
steps:
- id: main
run: |
REPOS=(
mobile-apps-api
mobile-platform
mobile-apps-article-templates
football-time-machine
mobile-entry
mobile-n10n
mobile-static
mobile-notifications-content
cross-platform-navigation
mobile-save-for-later
mobile-logstash-encoder
live-app-versions
myguardian-prefs-api
mobile-content-events
mobile-fastly-cache-purger
myguardian-support-services
)

RESULT=""
for repo in "${REPOS[@]}"; do
RESULT="$RESULT,guardian/$repo"
done

# remove leading ,
RESULT="${RESULT:1}"
echo "repos=$RESULT" >> $GITHUB_OUTPUT
prnouncer:
runs-on: ubuntu-latest
needs: setup
steps:
- name: Use GitHub App Token
uses: actions/create-github-app-token@v1
id: app-token
with:
# These values are for the GitHub App "Gu PRnouncer config"
# See https://github.com/organizations/guardian/settings/apps/gu-prnouncer-config (only accessible by GitHub owners)
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
owner: guardian

- uses: guardian/actions-prnouncer@main
with:
google-webhook-url: ${{ secrets.MOBILE_GOOGLE_WEBHOOK_URL }}
github-repositories: ${{ needs.setup.outputs.repos }}
github-token: ${{ steps.app-token.outputs.token }} # A GitHub app token generated by the previous step
github-ignored-users: ""
github-announced-users: 49699333,19733683,108136057
show-pr-age: "true"