Skip to content

Commit

Permalink
Merge branch 'main' into ibm_disk
Browse files Browse the repository at this point in the history
  • Loading branch information
mshaposhnik authored Jan 1, 2025
2 parents 3850019 + 4015b3d commit 64bba5a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 99 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/codecov-main.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,46 @@ on:
- opened
- synchronize
- reopened
branches:
- main
branches: [ main ]

push:
branches: [ main ]

repository_dispatch:
types: [trigger-mpc-test-with-sealights-ci]

concurrency:
group: ${{ github.event.pull_request.number }}
group: ${{ github.workflow }}-${{ (github.event_name == 'pull_request_target' && github.event.pull_request.number) || github.ref }}
cancel-in-progress: true

jobs:
checkout_and_test:
name: Golang Unit tests
runs-on: ubuntu-latest
steps:
- name: Handle invalid context
if: ${{ !github.event.pull_request.head.sha || !github.event.pull_request.number }}
- name: Determine workflow run event context
run: |
if [ "${{ github.event_name }}" == "push" ]; then
echo "Running tests on the merged main branch"
echo "on-event=push" >> $GITHUB_ENV
else
echo "Running tests on the pull request head branch"
echo "on-event=pull_request" >> $GITHUB_ENV
fi
- name: Handle invalid context for pull requests
if: ${{ env.on-event == 'pull_request' && (!github.event.pull_request.head.sha || !github.event.pull_request.number) }}
run: |
echo "Invalid context for this workflow run. Exiting."
exit 1
- name: Check out code of the forked repository's head branch
- name: Check out pull request head code - on pull_request event
if: ${{env.on-event}} == "pull_request"
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Check out main code - on push event
if: ${{env.on-event}} == "push"
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Install Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
with:
Expand All @@ -51,17 +66,25 @@ jobs:
run: echo "${SEALIGHTS_AGENT_TOKEN}" > sltoken.txt
env:
SEALIGHTS_AGENT_TOKEN: '${{secrets.SEALIGHTS_AGENT_TOKEN}}'
- name: Initiating and configuring SeaLights
if: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha && github.event.pull_request.number }}
- name: Initiating the SeaLights agent
run: |
echo "[Sealights] Initiating and configuring SeaLights to scan the pull request branch"
echo "[Sealights] Initiating the SeaLights agent to Goland and handing it the token"
./slcli config init --lang go --token ./sltoken.txt
- name: Configuring SeaLights - on pull_request event
if: ${{env.on-event}} == "pull_request"
run: |
echo "[Sealights] Configuring SeaLights to scan the pull request branch"
echo "Latest commit sha: ${LATEST_COMMIT_SHA}"
echo "PR Number: ${PULL_REQUEST_NUMBER}"
./slcli config create-pr-bsid --app multi-platform-controller --target-branch "main" --pull-request-number ${PULL_REQUEST_NUMBER} --latest-commit ${LATEST_COMMIT_SHA} --repository-url https://github.com/konflux-ci/multi-platform-controller
env:
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number || github.event.issue.number }}
LATEST_COMMIT_SHA: ${{github.event.pull_request.head.sha}}
- name: Configuring SeaLights - on push event
if: ${{env.on-event}} == "push"
run: |
echo "[Sealights] Configuring SeaLights to scan the main branch after pull request was closed"
./slcli config create-bsid --app multi-platform-controller --branch main --build multi-platform-controller-main-$(date +'%Y.%m.%d_%H:%M')
- name: Run the SeaLights scan
run: |
echo "[Sealights] Running the SeaLights scan"
Expand Down
57 changes: 0 additions & 57 deletions .github/workflows/sealights-mpc-scan-on-merged-main.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/trigger-sealights-mpc-scan-on-merged-main.yaml

This file was deleted.

0 comments on commit 64bba5a

Please sign in to comment.