diff --git a/.github/workflows/build-targets.yaml b/.github/workflows/build-targets.yaml index bc5b3b54..09f66870 100644 --- a/.github/workflows/build-targets.yaml +++ b/.github/workflows/build-targets.yaml @@ -1,4 +1,4 @@ -name: Build Code Editor Targets +name: Build Code Editor Targets11 on: push: branches: @@ -98,4 +98,4 @@ jobs: --namespace "GitHub/Workflows" \ --metric-name "ExecutionsFailed" \ --dimensions "Repository=${{ env.REPOSITORY }},Workflow=BuildTargets" \ - --value 1 \ No newline at end of file + --value 1 diff --git a/.github/workflows/security-scan.yaml b/.github/workflows/security-scan.yaml index cf04db53..76b7da9f 100644 --- a/.github/workflows/security-scan.yaml +++ b/.github/workflows/security-scan.yaml @@ -235,7 +235,7 @@ jobs: with: role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} aws-region: us-east-1 - role-session-name: security-scan-${{ matrix.target }}-${{matrix.branch}} + role-session-name: scan-${{ matrix.target }}-${{matrix.branch}} - name: Publish Scan Invoked metric run: | @@ -248,8 +248,14 @@ jobs: - name: Checkout branch uses: actions/checkout@v4 with: - ref: ${{ matrix.branch }} + # For fork-origin PRs, we can't directly use matrix.branch as the branch does not exist in the + # Code Editor repo. The branch only exists in the fork. + ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || matrix.branch }} submodules: recursive + + - name: Make sure code changes from PR branch are present + run: | + ls -l - name: Update security scan script from main run: | @@ -440,7 +446,7 @@ jobs: with: role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} aws-region: us-east-1 - role-session-name: security-scan-global-dependencies-${{matrix.branch}} + role-session-name: scan-global-dependencies-${{matrix.branch}} - name: Publish Scan Invoked metric run: | @@ -453,7 +459,9 @@ jobs: - name: Checkout branch uses: actions/checkout@v4 with: - ref: ${{ matrix.branch }} + # For fork-origin PRs, we can't directly use matrix.branch as the branch does not exist in the + # Code Editor repo. The branch only exists in the fork. + ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || matrix.branch }} submodules: recursive - name: Update security scan script from main diff --git a/test-file.txt b/test-file.txt new file mode 100644 index 00000000..26bdedc3 --- /dev/null +++ b/test-file.txt @@ -0,0 +1 @@ +Hi there! \ No newline at end of file