This repository was archived by the owner on Mar 31, 2025. It is now read-only.
Dry Run #437
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dry Run | |
on: | |
push: | |
workflow_dispatch: | |
schedule: | |
# Run the dry run every 4 hours | |
- cron: "0 */4 * * *" | |
jobs: | |
dry-run: | |
name: Run sync-team dry-run | |
runs-on: ubuntu-24.04 | |
if: ${{ github.repository_owner == 'rust-lang' }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# We don't need to do authenticated `git` operations, since we use the GitHub API. | |
persist-credentials: false | |
- uses: Swatinem/rust-cache@v2 | |
# GitHub tokens generated from GitHub Apps can access resources from one organization, | |
# so we need to generate a token for each organization. | |
- name: Generate GitHub token (rust-lang) | |
uses: actions/create-github-app-token@v1 | |
id: rust-lang-token | |
with: | |
# GitHub App ID secret name | |
app-id: ${{ secrets.GH_APP_ID }} | |
# GitHub App private key secret name | |
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
# Set the owner, so the token can be used in all repositories | |
owner: rust-lang | |
- name: Generate GitHub token (rust-lang-ci) | |
uses: actions/create-github-app-token@v1 | |
id: rust-lang-ci-token | |
with: | |
app-id: ${{ secrets.GH_APP_ID }} | |
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
owner: rust-lang-ci | |
- name: Generate GitHub token (rust-lang-deprecated) | |
uses: actions/create-github-app-token@v1 | |
id: rust-lang-deprecated-token | |
with: | |
app-id: ${{ secrets.GH_APP_ID }} | |
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
owner: rust-lang-deprecated | |
- name: Generate GitHub token (rust-lang-nursery) | |
uses: actions/create-github-app-token@v1 | |
id: rust-lang-nursery-token | |
with: | |
app-id: ${{ secrets.GH_APP_ID }} | |
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
owner: rust-lang-nursery | |
- name: Generate GitHub token (bors-rs) | |
uses: actions/create-github-app-token@v1 | |
id: bors-rs-token | |
with: | |
app-id: ${{ secrets.GH_APP_ID }} | |
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
owner: bors-rs | |
- name: Generate GitHub token (rust-analyzer) | |
uses: actions/create-github-app-token@v1 | |
id: rust-analyzer-token | |
with: | |
app-id: ${{ secrets.GH_APP_ID }} | |
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
owner: rust-analyzer | |
- name: Generate GitHub token (rust-embedded) | |
uses: actions/create-github-app-token@v1 | |
id: rust-embedded-token | |
with: | |
app-id: ${{ secrets.GH_APP_ID }} | |
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
owner: rust-embedded | |
- name: Generate GitHub token (rust-dev-tools) | |
uses: actions/create-github-app-token@v1 | |
id: rust-dev-tools-token | |
with: | |
app-id: ${{ secrets.GH_APP_ID }} | |
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
owner: rust-dev-tools | |
- name: Dry run | |
env: | |
GITHUB_TOKEN_RUST_LANG: ${{ steps.rust-lang-token.outputs.token }} | |
GITHUB_TOKEN_RUST_LANG_CI: ${{ steps.rust-lang-ci-token.outputs.token }} | |
GITHUB_TOKEN_RUST_LANG_DEPRECATED: ${{ steps.rust-lang-deprecated-token.outputs.token }} | |
GITHUB_TOKEN_RUST_LANG_NURSERY: ${{ steps.rust-lang-nursery-token.outputs.token }} | |
GITHUB_TOKEN_BORS_RS: ${{ steps.bors-rs-token.outputs.token }} | |
GITHUB_TOKEN_RUST_ANALYZER: ${{ steps.rust-analyzer-token.outputs.token }} | |
GITHUB_TOKEN_RUST_EMBEDDED: ${{ steps.rust-embedded-token.outputs.token }} | |
GITHUB_TOKEN_RUST_DEV_TOOLS: ${{ steps.rust-dev-tools-token.outputs.token }} | |
run: cargo run -- print-plan --services github |