ci: update changelog action token handling #2998
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: Open source oxy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - "[0-9]+.[0-9]+.x" | |
| pull_request_target: | |
| branches: | |
| - main | |
| - "[0-9]+.[0-9]+.x" | |
| permissions: | |
| contents: write | |
| actions: read | |
| pull-requests: read | |
| jobs: | |
| move-code: | |
| runs-on: "ubuntu-latest" | |
| if: ${{ ((github.event_name == 'push' && github.repository == 'oxy-hq/oxy-internal') || (github.event_name == 'pull_request_target' && github.repository == 'oxy-hq/oxy' && github.actor != 'dependabot[bot]' )) }} | |
| steps: | |
| - uses: actions/create-github-app-token@v3 | |
| name: Create GitHub App Token | |
| id: app-token | |
| with: | |
| app-id: ${{ vars.ARGO_APP_ID }} | |
| private-key: ${{ secrets.ARGO_APP_PRIVATE_KEY }} | |
| owner: ${{ github.repository_owner }} | |
| repositories: | | |
| oxy-internal | |
| oxy | |
| - name: Get GitHub App User ID | |
| id: get-user-id | |
| run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT" | |
| env: | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ inputs.branch || github.ref_name }} | |
| token: ${{ steps.app-token.outputs.token }} | |
| - uses: luong-komorebi/copybara-action@ft/sync-pull-request-title | |
| with: | |
| ssh_key: ${{ secrets.OXY_SSH_KEY }} | |
| access_token: ${{ steps.app-token.outputs.token }} | |
| sot_branch: ${{ github.ref_name }} | |
| destination_branch: ${{ github.ref_name }} | |
| sot_repo: oxy-hq/oxy-internal | |
| destination_repo: oxy-hq/oxy | |
| push_exclude: >- | |
| internal-docs/** | |
| # pr_move: |- | |
| # crates/core/dist||oss/dist||** | |
| committer: "${{ steps.app-token.outputs.app-slug }}[bot] <${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com>" |