sync-from-ui-commit #138
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: On Commit Dispatch | |
| on: | |
| repository_dispatch: | |
| types: [sync-from-ui-commit] | |
| permissions: | |
| id-token: write | |
| contents: write | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| commit_hash: ${{ steps.commit_changes.outputs.commit_hash }} | |
| steps: | |
| - name: Generate token | |
| id: generate_token | |
| uses: actions/create-github-app-token@v2 | |
| with: | |
| app-id: ${{ secrets.TEMPORAL_CICD_APP_ID }} | |
| private-key: ${{ secrets.TEMPORAL_CICD_PRIVATE_KEY }} | |
| - name: Checkout ui-server | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ steps.generate_token.outputs.token }} | |
| fetch-depth: 0 | |
| - name: Configure Git | |
| run: | | |
| echo ${{ steps.generate_token.outputs.token }} | gh auth login --with-token | |
| gh auth status -a | |
| git config --global user.name "temporal-cicd[bot]" | |
| git config --global user.email "[email protected]" | |
| - name: Download and Build UI | |
| uses: ./.github/actions/download-and-build-ui | |
| with: | |
| ref: ${{ github.event.client_payload.ref }} | |
| upstream_org: ${{ vars.UPSTREAM_ORG }} | |
| upstream_repo: ${{ vars.UPSTREAM_REPO }} | |
| - name: Commit changes | |
| id: commit_changes | |
| uses: ./.github/actions/commit-changes | |
| with: | |
| message: "Sync from UI commit ${{ github.sha }}" | |
| commit: | |
| uses: ./.github/workflows/on-commit.yaml | |
| needs: [sync] | |
| secrets: inherit | |
| with: | |
| ref: ${{ needs.sync.outputs.commit_hash }} |