Skip to content

Commit d45a410

Browse files
authored
Merge pull request #1721 from Kobzol/merge-queue-dry-run
Run sync-team in merge queue
2 parents 22f78f4 + 384ffb8 commit d45a410

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

.github/workflows/main.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,27 @@ jobs:
6565
pages: write
6666
if: github.event_name == 'merge_group'
6767
steps:
68+
- uses: actions/checkout@v4
69+
with:
70+
persist-credentials: false
71+
6872
- name: Download built JSON API and sync-team
6973
uses: actions/download-artifact@v4
7074
with:
7175
name: team-api-output
7276
path: build
7377

78+
- name: Sync changes
79+
env:
80+
GITHUB_TOKEN: ${{ secrets.WRITE_GITHUB_TOKEN }}
81+
MAILGUN_API_TOKEN: ${{ secrets.MAILGUN_API_TOKEN }}
82+
EMAIL_ENCRYPTION_KEY: ${{ secrets.EMAIL_ENCRYPTION_KEY }}
83+
ZULIP_API_TOKEN: ${{ secrets.ZULIP_API_TOKEN }}
84+
ZULIP_USERNAME: ${{ secrets.ZULIP_USERNAME }}
85+
run: |
86+
cargo run --manifest-path sync-team/Cargo.toml \
87+
apply --team-json build
88+
7489
- name: Disable Jekyll
7590
run: touch build/.nojekyll
7691

@@ -79,22 +94,11 @@ jobs:
7994
with:
8095
path: build
8196

97+
# Upload the pages only if the sync succeeded, to always keep the
98+
# most up-to-date state in the web endpoint.
8299
- name: Deploy to GitHub Pages
83100
uses: actions/deploy-pages@v4
84101

85-
- name: Configure AWS credentials
86-
uses: aws-actions/configure-aws-credentials@v1
87-
with:
88-
role-to-assume: arn:aws:iam::890664054962:role/ci--rust-lang--team
89-
aws-region: us-west-1
90-
91-
- name: Start the synchronization tool
92-
run: |
93-
# Introduce some artificial delay to help github pages propagate.
94-
sleep 60
95-
aws --region us-west-1 lambda invoke --function-name start-sync-team output.json
96-
cat output.json | python3 -m json.tool
97-
98102
# Summary job for the merge queue.
99103
# ALL THE PREVIOUS JOBS NEED TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
100104
CI:

sync-team/Cargo.lock

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)