Skip to content

Commit

Permalink
remove breaking change detect, try to fix build-test for codeql analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
lonegunmanb committed May 30, 2024
1 parent c5a0336 commit 7d73581
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 39 deletions.
21 changes: 2 additions & 19 deletions .github/workflows/breaking-change-detect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,6 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.event == 'pull_request' }}
steps:
- name: 'Download change artifact'
uses: dawidd6/action-download-artifact@268677152d06ba59fcec7a7f0b5d961b6ccd7e1e # v2.28.0
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
run_id: ${{ github.event.workflow_run.id }}
workflow: pr-check.yaml
name: change
if_no_artifact_found: ignore
- name: Check change existence
id: check_change
uses: andstor/file-existence-action@f02338908d150e00a4b8bebc2dad18bd9e5229b0 # v1.1.0
with:
files: "change"
- name: 'Comment on PR'
if: steps.check_change.outputs.files_exists == 'true'
- name: 'Bypass detect'
run: |
export PR_NUMBER=$(cat change | jq -r '.pr')
msg=$(cat change | jq -r '.body')
jq -n --arg msg "$msg" '{body: $msg}' > body.txt
curl -s -X POST -H "Accept: application/vnd.github+json" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/issues/$PR_NUMBER/comments -d @body.txt
echo "bypass detect"
21 changes: 1 addition & 20 deletions .github/workflows/pr-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,6 @@ jobs:
languages: go
- name: build-test
run: |
make build-test
sudo make build-test
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@1b1aada464948af03b950897e5eb522f92603cc2 #v3.24.9
- name: Breaking Change Brief
run: |
c=$(docker run --rm -t -v $(pwd):/src -w /src mcr.microsoft.com/azterraform:latest breaking_detect /src ${{ github.repository_owner }} ${{ github.event.repository.name }} ${{ github.base_ref }})
if [ ! -z "$c" ]; then
msg=$(printf "Potential Breaking Changes in ${{ github.event.pull_request.head.sha }}:\n${c}")
jq -n --arg msg "$msg" '{pr: ${{ github.event.pull_request.number }}, body: $msg}' > change
fi
- name: Check change existence
id: check_change
uses: andstor/file-existence-action@f02338908d150e00a4b8bebc2dad18bd9e5229b0 #v1.1.0
with:
files: "change"
- name: 'Upload breaking change warning'
if: steps.check_change.outputs.files_exists == 'true'
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 #v2.3.1
with:
retention-days: 1
name: change
path: change

0 comments on commit 7d73581

Please sign in to comment.