Skip to content

@Gate triggered by live-github-bot[bot] on branch feat/LIVE-8160-query-params #8093

@Gate triggered by live-github-bot[bot] on branch feat/LIVE-8160-query-params

@Gate triggered by live-github-bot[bot] on branch feat/LIVE-8160-query-params #8093

Workflow file for this run

name: "@PR • Gate"
run-name: "@Gate triggered by ${{ github.actor }} ${{ format('on branch {0}', github.head_ref || github.ref) }}"
on:
pull_request:
branches:
- develop
- main
- release
- hotfix
merge_group:
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name != 'develop' && github.ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
env:
number: ${{ github.event.pull_request.number || -1 }}
head_sha: ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }}
head_branch: ${{ github.event.pull_request.head.ref || github.event.merge_group.head_ref }}
base_sha: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }}
base_branch: ${{ github.event.pull_request.base.ref || github.event.merge_group.base_ref }}
base_owner: ${{ github.event.pull_request.base.repo.owner.login || github.repository_owner }}
is_fork: ${{ github.event.pull_request.head.repo.fork || false }}
jobs:
setup:
name: "Setup"
runs-on: ubuntu-latest
outputs:
affected: ${{ steps.affected.outputs.affected }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/github-script@v6
id: clean-refs
with:
script: |
const head_branch = "${{ env.head_branch }}";
const base_branch = "${{ env.base_branch }}";
const newHeadBranch = head_branch.replace("refs/heads/", "");
const newBaseBranch = base_branch.replace("refs/heads/", "");
core.exportVariable("head_branch", newHeadBranch);
core.exportVariable("base_branch", newBaseBranch);
- uses: ./tools/actions/turbo-affected
id: affected
with:
ref: ${{ format('origin/{0}', env.base_branch) }}
- uses: actions/github-script@v6
name: create output file ("affected.json")
with:
script: |
const fs = require("fs");
const affected = ${{ steps.affected.outputs.affected }};
fs.writeFileSync("affected.json", JSON.stringify(affected), "utf-8");
- uses: actions/upload-artifact@v3
with:
name: affected.json
path: affected.json
- uses: actions/github-script@v6
name: create output file ("pr_metadata.json")
with:
script: |
const fs = require("fs");
fs.writeFileSync("pr_metadata.json", JSON.stringify({
number: ${{ env.number }},
head_sha: "${{ env.head_sha }}",
head_branch: "${{ env.head_branch }}",
base_sha: "${{ env.base_sha }}",
base_branch: "${{ env.base_branch }}",
base_owner: "${{ env.base_owner }}",
is_fork: ${{ env.is_fork }}
}), "utf-8");
- uses: actions/upload-artifact@v3
with:
name: pr_metadata.json
path: pr_metadata.json